public void log ( Level level , Object message , Throwable t ) throws IllegalArgumentException { if ( level == null ) { throw new IllegalArgumentException ( "The level must not be null." ) ; } if ( getEffectiveLevel ( ) . toInt ( ) <= level . toInt ( ) && level . toInt ( ) > Level . OFF_INT ) { if ( firstLogEvent == true ) { addDefaultAppender ( ) ; try { open ( ) ; } catch ( IOException e ) { Log . e ( TAG , "Failed to open the log. " + e ) ; } stopWatch . start ( ) ; firstLogEvent = false ; } ListIterator < Appender > ite = appenderList . listIterator ( ) ; while ( ite . hasNext ( ) ) { Appender appender = ite . next ( ) ; if ( appender != null ) appender . doLog ( clientID , name , stopWatch . getCurrentTime ( ) , level , message , t ) ; } } }
Log the message and the Throwable object at the specified level .