Logging in Android
The Android™ Unified API client uses slf4j-android-logger to log messages to the Android logging system.
Log levels
Diffusion™ events are logged at different levels of severity. The log levels, ordered from most severe to least severe, are as follows:
Level | Description |
---|---|
ERROR | Events that indicate a failure. |
WARN | Events that indicate a problem with operation. |
INFO | Significant events. |
DEBUG | Verbose logging. Not usually enabled for production. |
TRACE | High-volume logging of interest only to Push Technology Support. Push Technology Support may occasionally ask you to enable this log level to diagnose issues. |
Warning: Logging can use considerable CPU resources. In a production environment, enable only
significant log messages (INFO and above). Performance degrades significantly
when running at finer logging levels as more messages are produced, each requiring
processing.
Configuring logging in the Android client
The Android JAR, diffusion-android-x.x.x.jar, contains a properties file, logger.properties. Edit this properties file to configure logging in the Diffusion Android client.
The default
logger.properties file contains the following properties:
de.psdev.slf4j.android.logger.logTag=DiffusionAndroidClient de.psdev.slf4j.android.logger.defaultLogLevel=INFO
For more information about slf4j-android-logger, see https://github.com/PSDev/slf4j-android-logger