private void log ( boolean finalLog , String format , Object ... args ) { if ( m_condition ) { if ( format != null ) { m_logger . debug ( String . format ( format , args ) ) ; } ArrayList < String > timerNames = new ArrayList < String > ( m_timers . keySet ( ) ) ; Collections . sort ( timerNames ) ; for ( String name : timerNames ) { TimerGroupItem timer = m_timers . get ( name ) ; if ( finalLog || timer . changed ( ) ) { m_logger . debug ( timer . toString ( finalLog ) ) ; } } m_logger . debug ( m_total . toString ( finalLog ) ) ; ArrayList < String > counterNames = new ArrayList < String > ( m_counters . keySet ( ) ) ; Collections . sort ( counterNames ) ; for ( String name : counterNames ) { Counter counter = m_counters . get ( name ) ; if ( finalLog || counter . changed ( ) ) { String text = String . format ( "%s: (%s)" , name , counter . toString ( finalLog ) ) ; m_logger . debug ( text ) ; } } } }
Log elapsed time of all named timers if the condition is true .