logback-android/src/main/java/ch/qos/logback/classic/android/LogcatAppender.java
public void append(ILoggingEvent event) {

    if (!isStarted()) {
      return;
    }

    String tag = getTag(event);

    switch (event.getLevel().levelInt) {
    case Level.ALL_INT:
    case Level.TRACE_INT:
      if (!checkLoggable || Log.isLoggable(tag, Log.VERBOSE)) {
        Log.v(tag, this.encoder.getLayout().doLayout(event));
      }
      break;

    case Level.DEBUG_INT:
      if (!checkLoggable || Log.isLoggable(tag, Log.DEBUG)) {
        Log.d(tag, this.encoder.getLayout().doLayout(event));
      }
      break;

    case Level.INFO_INT:
      if (!checkLoggable || Log.isLoggable(tag, Log.INFO)) {
        Log.i(tag, this.encoder.getLayout().doLayout(event));
      }
      break;

    case Level.WARN_INT:
      if (!checkLoggable || Log.isLoggable(tag, Log.WARN)) {
        Log.w(tag, this.encoder.getLayout().doLayout(event));
      }
      break;

    case Level.ERROR_INT:
      if (!checkLoggable || Log.isLoggable(tag, Log.ERROR)) {
        Log.e(tag, this.encoder.getLayout().doLayout(event));
      }
      break;

    case Level.OFF_INT:
    default:
      break;
    }
  }
public void append(ILoggingEvent event) {

    if (!isStarted()) {
      return;
    }

    String tag = getTag(event);

    switch (event.getLevel().levelInt) {
    case Level.ALL_INT:
    case Level.TRACE_INT:
      if (!checkLoggable || Log.isLoggable(tag, Log.VERBOSE)) {
        Log.v(tag, this.encoder.getLayout().doLayout(event));
      }
      break;

    case Level.DEBUG_INT:
      if (!checkLoggable || Log.isLoggable(tag, Log.DEBUG)) {
        Log.d(tag, this.encoder.getLayout().doLayout(event));
      }
      break;

    case Level.INFO_INT:
      if (!checkLoggable || Log.isLoggable(tag, Log.INFO)) {
        Log.i(tag, this.encoder.getLayout().doLayout(event));
      }
      break;

    case Level.WARN_INT:
      if (!checkLoggable || Log.isLoggable(tag, Log.WARN)) {
        Log.w(tag, this.encoder.getLayout().doLayout(event));
      }
      break;

    case Level.ERROR_INT:
      if (!checkLoggable || Log.isLoggable(tag, Log.ERROR)) {
        Log.e(tag, this.encoder.getLayout().doLayout(event));
      }
      break;

    case Level.OFF_INT:
    default:
      break;
    }
  }
public void append ( ILoggingEvent event ) { if ( ! isStarted ( ) ) { return ; } String tag = getTag ( event ) ; switch ( event . getLevel ( ) . levelInt ) { case Level . ALL_INT : case Level . TRACE_INT : if ( ! checkLoggable || Log . isLoggable ( tag , Log . VERBOSE ) ) { Log . v ( tag , this . encoder . getLayout ( ) . doLayout ( event ) ) ; } break ; case Level . DEBUG_INT : if ( ! checkLoggable || Log . isLoggable ( tag , Log . DEBUG ) ) { Log . d ( tag , this . encoder . getLayout ( ) . doLayout ( event ) ) ; } break ; case Level . INFO_INT : if ( ! checkLoggable || Log . isLoggable ( tag , Log . INFO ) ) { Log . i ( tag , this . encoder . getLayout ( ) . doLayout ( event ) ) ; } break ; case Level . WARN_INT : if ( ! checkLoggable || Log . isLoggable ( tag , Log . WARN ) ) { Log . w ( tag , this . encoder . getLayout ( ) . doLayout ( event ) ) ; } break ; case Level . ERROR_INT : if ( ! checkLoggable || Log . isLoggable ( tag , Log . ERROR ) ) { Log . e ( tag , this . encoder . getLayout ( ) . doLayout ( event ) ) ; } break ; case Level . OFF_INT : default : break ; } }
Writes an event to Android's logging mechanism (logcat)

@param event
the event to be logged
Writes an event to Android s logging mechanism ( logcat )