Package org.omegazero.common.logging
Class StdStreamsLoggerOutput
java.lang.Object
org.omegazero.common.logging.StdStreamsLoggerOutput
- All Implemented Interfaces:
LoggerOutput
A
LoggerOutput writing to stdout or stderr.- Since:
- 2.10
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidflush()Flushes any buffered data to the underlying output.voidsetUseStderr(boolean useStderr) Set the output stream where all log messages written to thisLoggerOutputwill be printed to.voidWrites the given log line to thisLoggerOutput.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.omegazero.common.logging.LoggerOutput
close
-
Constructor Details
-
StdStreamsLoggerOutput
public StdStreamsLoggerOutput()
-
-
Method Details
-
setUseStderr
public void setUseStderr(boolean useStderr) Set the output stream where all log messages written to thisLoggerOutputwill be printed to. If set totrue, all log messages will be printed to the defaultSystem.errinstead of the defaultSystem.out.- Parameters:
useStderr- If loggers should usestderrfor log messages
-
writeLine
Description copied from interface:LoggerOutputWrites the given log line to thisLoggerOutput.- Specified by:
writeLinein interfaceLoggerOutput- Parameters:
line- The log messagemarkup- Special terminal escape sequences used for text markup
-
flush
public void flush()Description copied from interface:LoggerOutputFlushes any buffered data to the underlying output.- Specified by:
flushin interfaceLoggerOutput
-