logback-android/src/main/java/ch/qos/logback/classic/android/SQLiteAppender.java
@Override
  public void append(ILoggingEvent eventObject) {
    if (isStarted()) {
      try {
        clearExpiredLogs(db);
        SQLiteStatement stmt = db.compileStatement(insertSQL);
        try {
          db.beginTransaction();
          long eventId = subAppend(eventObject, stmt);
          if (eventId != -1) {
            secondarySubAppend(eventObject, eventId);
            db.setTransactionSuccessful();
          }
        } finally {
          if (db.inTransaction()) {
            db.endTransaction();
          }
          stmt.close();
        }
      } catch (Throwable e) {
        addError("Cannot append event", e);
      }
    }
  }
@Override
  public void append(ILoggingEvent eventObject) {
    if (isStarted()) {
      try {
        clearExpiredLogs(db);
        SQLiteStatement stmt = db.compileStatement(insertSQL);
        try {
          db.beginTransaction();
          long eventId = subAppend(eventObject, stmt);
          if (eventId != -1) {
            secondarySubAppend(eventObject, eventId);
            db.setTransactionSuccessful();
          }
        } finally {
          if (db.inTransaction()) {
            db.endTransaction();
          }
          stmt.close();
        }
      } catch (Throwable e) {
        addError("Cannot append event", e);
      }
    }
  }
@ Override public void append ( ILoggingEvent eventObject ) { if ( isStarted ( ) ) { try { clearExpiredLogs ( db ) ; SQLiteStatement stmt = db . compileStatement ( insertSQL ) ; try { db . beginTransaction ( ) ; long eventId = subAppend ( eventObject , stmt ) ; if ( eventId != - 1 ) { secondarySubAppend ( eventObject , eventId ) ; db . setTransactionSuccessful ( ) ; } } finally { if ( db . inTransaction ( ) ) { db . endTransaction ( ) ; } stmt . close ( ) ; } } catch ( Throwable e ) { addError ( "Cannot append event" , e ) ; } } }
/*
(non-Javadoc)
@see ch.qos.logback.core.UnsynchronizedAppenderBase#append(java.lang.Object)
/ * ( non - Javadoc )