Class LoggingStreamConsumer
- java.lang.Object
-
- com.exasol.extensionmanager.itest.process.LoggingStreamConsumer
-
- All Implemented Interfaces:
ProcessStreamConsumer
public class LoggingStreamConsumer extends Object implements ProcessStreamConsumer
ThisProcessStreamConsumerlogs all content with a configurable log level using aLogger.
-
-
Constructor Summary
Constructors Constructor Description LoggingStreamConsumer(String prefix, Level logLevel)Create a newLoggingStreamConsumer.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(String line)Called when a new line was read from the input stream.voidreadFailed(IOException exception)Called when reading the input stream failed.voidreadFinished()Called when reading the input stream finished.
-
-
-
Constructor Detail
-
LoggingStreamConsumer
public LoggingStreamConsumer(String prefix, Level logLevel)
Create a newLoggingStreamConsumer.- Parameters:
prefix- prefix for all log messageslogLevel- log level for all log messages
-
-
Method Detail
-
accept
public void accept(String line)
Description copied from interface:ProcessStreamConsumerCalled when a new line was read from the input stream.- Specified by:
acceptin interfaceProcessStreamConsumer- Parameters:
line- the read line
-
readFinished
public void readFinished()
Description copied from interface:ProcessStreamConsumerCalled when reading the input stream finished.- Specified by:
readFinishedin interfaceProcessStreamConsumer
-
readFailed
public void readFailed(IOException exception)
Description copied from interface:ProcessStreamConsumerCalled when reading the input stream failed.- Specified by:
readFailedin interfaceProcessStreamConsumer- Parameters:
exception- the exception.
-
-