Mobile SDK - Activate Debug Logs

In some cases, in order to identify the source of an issue, we require Airship SDK logs from your app. These logs are used for reporting events from our SDK which are useful when debugging and troubleshooting how our code is behaving in your app. Logs must be enabled within your App Code as part of Airship's implementation which requires editing of a config file. For this reason, we recommend using a non-production app to troubleshoot. 

Find the Implementation details for enabling logging required by Airship support below. 


On the Android side for debugging logs, users should either usesetLogLevel or the dev/prod setters, not both. Unlike iOS, Android does not have a way to change the log level programmatically after takeOff is called.

Within the file, please modify the LogLevel to Verbose:

# LogLevel is "VERBOSE", "DEBUG", "INFO", "WARN", "ERROR" or "ASSERT"
developmentLogLevel = VERBOSE
productionLogLevel = ERROR


                // Sets the log level for both development and production.
                // Sets the log level for development only.
                // Sets the log level for production only.
                // Other config options here...

You can find more information in our Android documentation more details. 



On iOS the log level defaults to UALogLevelDebug for development apps, and UALogLevelError for production apps (when the inProduction AirshipConfig flag is set to YES

To enable logging on iOS there are 2 ways: modifying the AirshipConfig.plist or setting it in code after takeOff()

Airship Config




After calling takeOff() you can override the default logging settings. Values set with this method prior to takeOff() will be overridden

Airship.logLevel = .trace

Different Log Levels

* No log messages.
.none = 0,

* Log error messages.
* Used for critical errors, parse exceptions and other situations that cannot be gracefully handled.
.error = 1,

* Log warning messages.
* Used for API deprecations, invalid setup and other potentially problematic situations.
.warn = 2,

* Log informative messages.
* Used for reporting general SDK status.
.info = 3,

* Log debugging messages.
* Used for reporting general SDK status with more detailed information.
.debug = 4,

* Log detailed tracing messages.
* Used for reporting highly detailed SDK status that can be useful when debugging and troubleshooting.
.trace = 5
Was this article helpful?
0 out of 0 found this helpful
Submit a request