SLF4J Android

The motivation for the SLF4J Android project was to ease using existing libraries which use SLF4J as their logging framework on the Google Android platform.

This project is basically a (i) repackaging of the SLF4J API part, together with (ii) a very lightweight binding implementation that simply forwards all SLF4J log requests to the logger provided on the Google Android platform. The API part is compiled from the same code basis of the standard distribution. This is the reason why we decided to keep the version numbering in sync with the standard SLF4J releases in order to reflect the code basis from which it was built.

Status

The implementation is currently fully functional but has not yet been fully tested in a production environment. Let us know if you have used it in production!

Usage

Log level mapping

The following table shows the mapping from SLF4J log levels to log levels in the Android platform implemented by the logger binding.

SLF4JAndroid
TRACEVERBOSE
DEBUGDEBUG
INFOINFO
WARNWARN
ERRORERROR

Limitations

The Android binding implementation currently does not support Markers. All logging methods which have a Marker parameter simply delegate to the corresponding method without a Marker parameter, i.e., the Marker parameter is silently ignored.

Download

Binary: slf4j-android-1.5.8.jar [sha1]
Source: slf4j-android-1.5.8-sources.jar [sha1]

Credits

Created and maintained by Thorsten Möller, Databases and Information Systems Group – University of Basel – Switzerland

License

Source code and binaries are distributed under the MIT license.