Advanced logging library for Android applications
logback-android brings the power of Logback to Android. Logback is a reliable, generic, fast, and flexible logging library for Java applications.
The current version is 1.0.7-1.
- logback-android-1.0.7-1.jar (SHA1:
879079a6f5858c3ed40d0fec2e6728e536dd3f1a
) - slf4j-api-1.7.1.jar (SHA1:
1a508b0ecd360507a39a4dbaedd1aa4750741f6d
)
-
Enter configuration XML in one of the following locations. Note that logback-android checks them in exact order and uses the first one found.
- SD card (
/sdcard/logback/logback.xml
) - Your application's
AndroidManifest.xml
- Your application's
assets/logback.xml
(create dir if necessary)
If not found, a simple
LogcatAppender
is used by default. - SD card (
-
Ready to run!
See examples
Runs on Android 2.1+
logback-android supports only a subset of Logback's features (i.e., the logback-core and logback-classic modules). It does NOT support the following:
- logback-access
- Groovy configuration
- Conditionals in the configuration XML
- JMS, JMX, JNDI, and Servlets
For help with using logback-android, ask the mailing list: [email protected].
logback-android is built with Apache Maven. Use these commands to create the uber JAR.
mvn install
mvn -f pom-uber.xml package -Dmy.project.version=1.0.7-2-SNAPSHOT
NOTE: The uber jar contains logback-android-core
, logback-android-classic
, and apktool-lib
(repackaged under ch.qos.logback.repackage
). The apktool-lib
will be optional in a future release.
To include logback-android in your Maven project, add the following dependencies to your project's pom.xml
:
<dependency>
<groupId>com.github.tony19</groupId>
<artifactId>logback-android-core</artifactId>
<version>1.0.7-1</version>
</dependency>
<dependency>
<groupId>com.github.tony19</groupId>
<artifactId>logback-android-classic</artifactId>
<version>1.0.7-1</version>
</dependency>