@Test public void testLogError() { streamLogger = new ConfigurableStreamLogger( log, is, LogLevel.ERROR, PREFIX ); streamLogger.run(); Mockito.verify( log ).logError( OUT1 ); Mockito.verify( log ).logError( OUT2 ); }
public void run() { try { InputStreamReader isr = new InputStreamReader( this.is ); BufferedReader br = new BufferedReader( isr ); String line = null; while ( ( line = br.readLine() ) != null ) { String logEntry = this.type + " " + line; switch ( this.logLevel ) { case MINIMAL: log.logMinimal( logEntry ); break; case BASIC: log.logBasic( logEntry ); break; case DETAILED: log.logDetailed( logEntry ); break; case DEBUG: log.logDebug( logEntry ); break; case ROWLEVEL: log.logRowlevel( logEntry ); break; case ERROR: log.logError( logEntry ); break; default: break; } } } catch ( IOException ioe ) { if ( log.isError() ) { log.logError( this.type + " " + Const.getStackTracker( ioe ) ); } } }
ConfigurableStreamLogger implements Runnable { public void run() { try { InputStreamReader isr = new InputStreamReader( this.is ); BufferedReader br = new BufferedReader( isr ); String line = null; while ( ( line = br.readLine() ) != null ) { String logEntry = this.type + " " + line; switch ( this.logLevel ) { case MINIMAL: log.logMinimal( logEntry ); break; case BASIC: log.logBasic( logEntry ); break; case DETAILED: log.logDetailed( logEntry ); break; case DEBUG: log.logDebug( logEntry ); break; case ROWLEVEL: log.logRowlevel( logEntry ); break; case ERROR: log.logError( logEntry ); break; default: break; } } } catch ( IOException ioe ) { if ( log.isError() ) { log.logError( this.type + " " + Const.getStackTracker( ioe ) ); } } } }
ConfigurableStreamLogger implements Runnable { public void run() { try { InputStreamReader isr = new InputStreamReader( this.is ); BufferedReader br = new BufferedReader( isr ); String line = null; while ( ( line = br.readLine() ) != null ) { String logEntry = this.type + " " + line; switch ( this.logLevel ) { case MINIMAL: log.logMinimal( logEntry ); break; case BASIC: log.logBasic( logEntry ); break; case DETAILED: log.logDetailed( logEntry ); break; case DEBUG: log.logDebug( logEntry ); break; case ROWLEVEL: log.logRowlevel( logEntry ); break; case ERROR: log.logError( logEntry ); break; default: break; } } } catch ( IOException ioe ) { if ( log.isError() ) { log.logError( this.type + " " + Const.getStackTracker( ioe ) ); } } } ConfigurableStreamLogger( LogChannelInterface logChannel, final InputStream in, final LogLevel logLevel,
    final String type ); }
ConfigurableStreamLogger implements Runnable { public void run() { try { InputStreamReader isr = new InputStreamReader( this.is ); BufferedReader br = new BufferedReader( isr ); String line = null; while ( ( line = br.readLine() ) != null ) { String logEntry = this.type + " " + line; switch ( this.logLevel ) { case MINIMAL: log.logMinimal( logEntry ); break; case BASIC: log.logBasic( logEntry ); break; case DETAILED: log.logDetailed( logEntry ); break; case DEBUG: log.logDebug( logEntry ); break; case ROWLEVEL: log.logRowlevel( logEntry ); break; case ERROR: log.logError( logEntry ); break; default: break; } } } catch ( IOException ioe ) { if ( log.isError() ) { log.logError( this.type + " " + Const.getStackTracker( ioe ) ); } } } ConfigurableStreamLogger( LogChannelInterface logChannel, final InputStream in, final LogLevel logLevel,
    final String type ); void run(); }
ConfigurableStreamLogger implements Runnable { public void run() { try { InputStreamReader isr = new InputStreamReader( this.is ); BufferedReader br = new BufferedReader( isr ); String line = null; while ( ( line = br.readLine() ) != null ) { String logEntry = this.type + " " + line; switch ( this.logLevel ) { case MINIMAL: log.logMinimal( logEntry ); break; case BASIC: log.logBasic( logEntry ); break; case DETAILED: log.logDetailed( logEntry ); break; case DEBUG: log.logDebug( logEntry ); break; case ROWLEVEL: log.logRowlevel( logEntry ); break; case ERROR: log.logError( logEntry ); break; default: break; } } } catch ( IOException ioe ) { if ( log.isError() ) { log.logError( this.type + " " + Const.getStackTracker( ioe ) ); } } } ConfigurableStreamLogger( LogChannelInterface logChannel, final InputStream in, final LogLevel logLevel,
    final String type ); void run();  }