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 TypeMethodDescriptionvoid
flush()
Flushes any buffered data to the underlying output.void
setUseStderr
(boolean useStderr) Set the output stream where all log messages written to thisLoggerOutput
will be printed to.void
Writes the given log line to thisLoggerOutput
.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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 thisLoggerOutput
will be printed to. If set totrue
, all log messages will be printed to the defaultSystem.err
instead of the defaultSystem.out
.- Parameters:
useStderr
- If loggers should usestderr
for log messages
-
writeLine
Description copied from interface:LoggerOutput
Writes the given log line to thisLoggerOutput
.- Specified by:
writeLine
in interfaceLoggerOutput
- Parameters:
line
- The log messagemarkup
- Special terminal escape sequences used for text markup
-
flush
public void flush()Description copied from interface:LoggerOutput
Flushes any buffered data to the underlying output.- Specified by:
flush
in interfaceLoggerOutput
-