public class ConsoleApplicationLogger extends AbstractApplicationLogger
ApplicationLogger
that outputs all messages to System.out
and System.err
.
isUseErrorStream()
determines to which stream error messages are written. The default value is true
. All other messages are always written
to System.out
.
Constructor and Description |
---|
ConsoleApplicationLogger() |
Modifier and Type | Method and Description |
---|---|
void |
addMessage(ApplicationLoggerMessage message)
Outputs a usual message to the user.
|
boolean |
isUseErrorStream()
Determines whether error messages received by this logger should be written to
System.err or System.out . |
void |
setUseErrorStream(boolean useErrorStream)
Determines whether error messages received by this logger should be written to
System.err or System.out . |
addError, addError, addError, addError, addMessage, addMessage, addWarning, addWarning
public ConsoleApplicationLogger()
public boolean isUseErrorStream()
System.err
or System.out
.true
if error messages are currently written to System.err
or false
if they are written to System.out
insteadpublic void setUseErrorStream(boolean useErrorStream)
System.err
or System.out
.useErrorStream
- Specify true
here if error messages should be written to System.err
or false
if they should be written to
System.out
.public void addMessage(ApplicationLoggerMessage message)
ApplicationLogger