Skip to content
The reliable, generic, fast and flexible logging framework for Java on Android.
Java Other
Pull request Compare This branch is 491 commits ahead, 367 commits behind qos-ch:master.
Latest commit c0aee6f Apr 8, 2016 @tony19 :zap: Set title for javadocs

logback-android CircleCI branch Codacy Badge



logback-android brings the power of logback to Android. This library provides a highly configurable logging framework for Android apps, supporting multiple log destinations simultaneously:

  • files
  • SQLite databases
  • logcat
  • sockets
  • syslog
  • email

Runs on Android 2.1 or higher. See Wiki for documentation.

Quick Start

  1. Create a new "Basic Activity" app in Android Studio.
  2. In app/build.gradle, add the following dependencies:

    // only needed for SNAPSHOT builds
    repositories {
      maven { url '' }
    dependencies {
      compile 'org.slf4j:slf4j-api:1.7.21'
      compile 'com.github.tony19:logback-android-core:1.1.1-5'
      compile('com.github.tony19:logback-android-classic:1.1.1-5') {
        // workaround issue #73
        exclude group: '', module: 'android'
  3. Create app/src/main/assets/logback.xml containing:

      <appender name="logcat" class="">
          <pattern>[%-20thread] %msg</pattern>
      <root level="DEBUG">
        <appender-ref ref="logcat" />
  4. In, add the following imports:

    import org.slf4j.Logger;
    import org.slf4j.LoggerFactory;
  5. ...and modify onOptionsItemSelected() to log "hello world":

    public boolean onOptionsItemSelected(MenuItem item) {
        Logger log = LoggerFactory.getLogger(MainActivity.class);"hello world");
        // ...
  6. Build and start the app.

  7. Open logcat for your device (via the Android Monitor tab in Android Studio).
  8. Click the app menu, and select the menu-option. You should see "hello world" in logcat.



// only needed for SNAPSHOT builds
repositories {
  maven { url '' }

dependencies {
  compile 'org.slf4j:slf4j-api:1.7.21'
  compile 'com.github.tony19:logback-android-core:1.1.1-5'
  compile 'com.github.tony19:logback-android-classic:1.1.1-5'

Prefer local jars?


logback-android is built with Gradle 2.12. Use these commands to create the uber jar (with debug symbols).

git clone git://
cd logback-android

The jar would be in: ./build/logback-android-1.1.1-5.jar

Something went wrong with that request. Please try again.