|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.sdm.quasar.client.log4j.common.logging.impl.Log4JLogHandler
| Field Summary | |
static java.lang.String |
DEFAULT_MESSAGE_PATTERN
The default message pattern used to format log messages. |
| Constructor Summary | |
Log4JLogHandler()
Creates a new Log4JLogHandler.
|
|
Log4JLogHandler(Logger log4jLogger)
Creates a new Log4JLogHandler. |
|
Log4JLogHandler(Logger log4jLogger,
java.lang.String messagePattern,
int[] errorLoggingLevels)
Creates a new Log4JLogHandler.
|
|
Log4JLogHandler(java.lang.String messagePattern,
int[] errorLoggingLevels)
Creates a new Log4JLogHandler.
|
|
| 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 |
public Log4JLogHandler()
Log4JLogHandler.
The Log4J Root Logger will be used (see Logger#getRootLogger().
public Log4JLogHandler(java.lang.String messagePattern,
int[] errorLoggingLevels)
Log4JLogHandler.
The Log4J Root Logger will be used (see Logger#getRootLogger().
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)public Log4JLogHandler(Logger log4jLogger)
Log4JLogHandler.
log4jLogger - The Log4J Logger that will be used.
public Log4JLogHandler(Logger log4jLogger,
java.lang.String messagePattern,
int[] errorLoggingLevels)
Log4JLogHandler.
The Log4J Root Logger will be used (see Logger#getRootLogger().
log4jLogger - The Log4J Logger that will be used.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 givende.bafa.jfee.common.logging.LogHandler#handles(int, de.bafa.jfee.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)
de.bafa.jfee.common.logging.LogHandler#isLogging(int, de.bafa.jfee.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)de.bafa.jfee.common.logging.LogHandler#log(int, de.bafa.jfee.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 | ||||||||||