public interface LogPrinter extends LogLevelEvent.Source, java.io.Closeable
LogChannel where it must be registered as a LogMessageEvent.Listener.
LogLevel which is controlled with
the setLogLevel(LogLevel) method. Log messages below the current LogLevel are
not printed (except DUMP messages, which are always printed). You may stop/restart the
processing of messages at all with the setSilent(boolean) method.
LogFormatter which
can be customized as needed.LogChannel,
LogMessageEvent| Modifier and Type | Method and Description |
|---|---|
void |
close()
Deregisters the LogPrinter from the underlying LogChannel and releases all associated
resources.
|
LogChannel |
getLogChannel()
Returns the underlying
LogChannel from where the messages are received. |
LogFormatter |
getLogFormatter()
Returns the formatter for formatting the logMessage
|
LogLevel |
getLogLevel()
Returns the current log level in use.
|
TextPrintable |
getOutput(LogLevel level)
Returns a
TextPrintable where the message is printed to. |
java.lang.String |
getTypeString()
Returns a string identifying the type of this LogPrinter.
|
boolean |
isSilent()
Tells whether this
LogPrinter is in silent mode. |
void |
setLogLevel(LogLevel level)
Defines the 'importance level' as defined in
LogLevel. |
void |
setSilent(boolean state)
Sets this
LogPrinter into silent mode. |
addLogLevelListener, removeLogLevelListenerLogChannel getLogChannel()
LogChannel from where the messages are received.java.lang.String getTypeString()
LogLevel getLogLevel()
void setSilent(boolean state)
LogPrinter into silent mode. No further output will occur.
Note that this does not affect the current LogLevel.
After re-enabling reporting will continue in current LogLevel.boolean isSilent()
LogPrinter is in silent mode.TextPrintable getOutput(LogLevel level)
TextPrintable where the message is printed to.
The output may be different for different LogLevels.LogFormatter getLogFormatter()
void close()
close in interface java.lang.AutoCloseableclose in interface java.io.CloseableCopyright © 2014 EsprIT-Systems. All Rights Reserved.