|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.sdm.quasar.client.core.common.logging.impl.SimpleConsoleLogHandler
Primitive logger factory that creates SimpleConsoleLoggers.
This implementation acts as a fallback if the LogManager is
not initialized.
| Field Summary | |
static java.lang.String |
DEFAULT_MESSAGE_PATTERN
The default message pattern used to format log messages. |
| Constructor Summary | |
protected |
SimpleConsoleLogHandler()
Creates a new SimpleConsoleLogHandler. |
protected |
SimpleConsoleLogHandler(java.lang.String messagePattern,
int[] errorLoggingLevels)
Creates a new SimpleConsoleLogHandler. |
| Method Summary | |
java.lang.String |
getMessagePattern()
Returns the message format pattern used to format log messages. |
boolean |
handles(int loggingLevel,
CallerInformation callerInformation)
Returns true, if the LogHandler can handle logging
messages for the calling logger and logging level. |
boolean |
isErrorLoggingLevel(int loggingLevel)
Returns true, if the given logging level is an 'error'
logging level or a normal one. |
boolean |
isLogging(int loggingLevel,
CallerInformation callerInformation)
Tests, whether messages will be logged at the given logging level |
void |
log(int loggingLevel,
CallerInformation callerInformation,
java.lang.String message,
java.lang.Throwable exception)
Logs a message including an optional exception if logging is enabled for the specified calling logger and logging level. |
void |
setMessagePattern(java.lang.String messagePattern)
Sets the message format pattern used to format log messages. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final java.lang.String DEFAULT_MESSAGE_PATTERN
| Constructor Detail |
protected SimpleConsoleLogHandler()
SimpleConsoleLogHandler.
protected SimpleConsoleLogHandler(java.lang.String messagePattern,
int[] errorLoggingLevels)
SimpleConsoleLogHandler.
messagePattern - the message-patter to use (if null, use default)errorLoggingLevels - the logging levels, that should be used as
error logging levels (if null, use default)| Method Detail |
public boolean handles(int loggingLevel,
CallerInformation callerInformation)
LogHandlertrue, if the LogHandler can handle logging
messages for the calling logger and logging level.
handles in interface LogHandlerloggingLevel - the level to be logged, one of the constants from LoggingLevelcallerInformation - stores information about the logger caller (garanteed to be not null)
true, iff this LogHandler can handle logging
messages for the logger class and logging level givenLogHandler.handles(int, com.sdm.quasar.client.core.common.logging.CallerInformation)
public boolean isLogging(int loggingLevel,
CallerInformation callerInformation)
LogHandler
isLogging in interface LogHandlerloggingLevel - the level to be logged, one of the constants from LoggingLevelcallerInformation - stores information about the logger caller (garanteed to be not null)
LogHandler.isLogging(int, com.sdm.quasar.client.core.common.logging.CallerInformation)
public void log(int loggingLevel,
CallerInformation callerInformation,
java.lang.String message,
java.lang.Throwable exception)
LogHandler
log in interface LogHandlerloggingLevel - the level to be logged, one of the constants from LoggingLevelcallerInformation - stores information about the logger caller (garanteed to be not null)message - the message to be logged (may be null)exception - the exception to be logged (may be null)LogHandler.log(int, com.sdm.quasar.client.core.common.logging.CallerInformation, java.lang.String, java.lang.Throwable)public boolean isErrorLoggingLevel(int loggingLevel)
true, if the given logging level is an 'error'
logging level or a normal one.
loggingLevel - the logging level to check
true if the logging level should be logged as
error, false otherwise.public java.lang.String getMessagePattern()
public void setMessagePattern(java.lang.String messagePattern)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||