Logging

Configure log levels to control how the Airship SDK logs messages.

The Airship SDK provides configurable log levels to help you debug issues without overwhelming the console. By default, the log level is set to Info for development builds and Error for production builds to ensure clean logs in a live environment.

Log levels

The following log levels are available, ordered from most to least verbose.

Log Level Description
Verbose Reports highly detailed SDK status, which is useful for deep debugging and troubleshooting.
Debug Reports general SDK status with more detailed information than Info.
Info Reports general SDK status and lifecycle events.
Warning Used for API deprecations, invalid setup, and other potentially problematic situations that are generally recoverable.
Error Used for critical errors, exceptions, and other situations that the SDK cannot gracefully handle.
Assert Disables all logging.

Configuring log levels

You can set the log level in the Airship config files for Android and iOS.

Android

In your airshipconfig.properties file:

# Available log levels: VERBOSE, DEBUG, INFO, WARN, ERROR, ASSERT
productionLogLevel = VERBOSE
developmentLogLevel = VERBOSE

iOS

In your AirshipConfig.plist file:

<!--  Available log levels: TRACE, DEBUG, INFO, WARNING, NONE -->
<key>productionLogLevel</key>
<string>TRACE</string>
<key>developmentLogLevel</key>
<string>TRACE</string>