public class ConsoleLogger extends AbstractLogger
Logger that outputs to a PrintStream, usually stdout or stderr. This has largely
been superseded by the FormattingLogger, and may be deprecated in future.| Modifier and Type | Field and Description |
|---|---|
static PrintStream |
defaultOutput
Default output stream for
ConsoleLogger |
| Modifier and Type | Method and Description |
|---|---|
void |
debug(Object message)
Output a debug message.
|
void |
error(Object message)
Output an error message.
|
void |
error(Throwable throwable,
Object message)
Output an error message along with a
Throwable. |
PrintStream |
getOutput()
Get the output stream associated with this
ConsoleLogger. |
char |
getSeparator()
Get the character separator used to format output messages.
|
void |
info(Object message)
Output an info message.
|
void |
log(net.pwall.log.Level level,
Object message)
Output a message with a variable level.
|
void |
setSeparator(char separator)
Set the character separator used to format output messages.
|
void |
trace(Object message)
Output a trace message.
|
void |
warn(Object message)
Output a warning message.
|
getClock, getLevel, getName, outputMultiLine, setLevelpublic static final PrintStream defaultOutput
ConsoleLoggerpublic PrintStream getOutput()
ConsoleLogger.public char getSeparator()
public void setSeparator(char separator)
separator - the new separatorpublic void trace(Object message)
message - the message (will be output using Object.toString()public void debug(Object message)
message - the message (will be output using Object.toString()public void info(Object message)
message - the message (will be output using Object.toString()public void warn(Object message)
message - the message (will be output using Object.toString()public void error(Object message)
message - the message (will be output using Object.toString()public void error(Throwable throwable, Object message)
Throwable.message - the message (will be output using Object.toString()throwable - the Throwablepublic void log(net.pwall.log.Level level,
Object message)
level - the Levelmessage - the message (will be output using toString()Copyright © 2024. All rights reserved.