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.LogChannelCache
,
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.
|
TextConsole |
getOutput(LogLevel level)
Returns a
TextConsole 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, removeLogLevelListener
LogChannel 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.TextConsole getOutput(LogLevel level)
TextConsole
where the message is printed to.
The output may be different for different LogLevel
s.LogFormatter getLogFormatter()
void close()
close
in interface java.lang.AutoCloseable
close
in interface java.io.Closeable
Copyright © 2012 EsprIT-Systems. All Rights Reserved.