Package org.apache.commons.jcs3.log
Class Log4j2LogAdapter
java.lang.Object
org.apache.commons.jcs3.log.Log4j2LogAdapter
- All Implemented Interfaces:
Log
This is a wrapper around the
org.apache.logging.log4j.Logger implementing our own
Log interface.-
Constructor Summary
ConstructorsConstructorDescriptionLog4j2LogAdapter(org.apache.logging.log4j.Logger logger) Construct a Log4j Logger wrapper -
Method Summary
Modifier and TypeMethodDescriptionvoidLogs a message object with the DEBUG level.voidLogs a message object with the DEBUG level.voidLogs a message with parameters at the DEBUG level.voidLogs a message at the DEBUG level including the stack trace of theThrowabletpassed as parameter.voidLogs a message with parameters which are only to be constructed if the logging level is the DEBUG level.voidLogs a message object with the ERROR level.voidLogs a message object with the ERROR level.voidLogs a message with parameters at the ERROR level.voidLogs a message at the ERROR level including the stack trace of theThrowabletpassed as parameter.voidLogs a message with parameters which are only to be constructed if the logging level is the ERROR level.voidLogs a message object with the FATAL level.voidLogs a message object with the FATAL level.voidLogs a message with parameters at the FATAL level.voidLogs a message at the FATAL level including the stack trace of theThrowabletpassed as parameter.voidLogs a message with parameters which are only to be constructed if the logging level is the FATAL level.getName()Gets the logger name.voidLogs a message object with the INFO level.voidLogs a message object with the INFO level.voidLogs a message with parameters at the INFO level.voidLogs a message at the INFO level including the stack trace of theThrowabletpassed as parameter.voidLogs a message with parameters which are only to be constructed if the logging level is the INFO level.booleanChecks whether this Logger is enabled for the DEBUG Level.booleanChecks whether this Logger is enabled for the ERROR Level.booleanChecks whether this Logger is enabled for the FATAL Level.booleanChecks whether this Logger is enabled for the INFO Level.booleanChecks whether this Logger is enabled for the TRACE level.booleanChecks whether this Logger is enabled for the WARN Level.voidLogs a message object with the TRACE level.voidLogs a message object with the TRACE level.voidLogs a message with parameters at the TRACE level.voidLogs a message at the TRACE level including the stack trace of theThrowabletpassed as parameter.voidLogs a message with parameters which are only to be constructed if the logging level is the TRACE level.voidLogs a message object with the WARN level.voidLogs a message object with the WARN level.voidLogs a message with parameters at the WARN level.voidLogs a message at the WARN level including the stack trace of theThrowabletpassed as parameter.voidLogs a message with parameters which are only to be constructed if the logging level is the WARN level.
-
Constructor Details
-
Log4j2LogAdapter
Construct a Log4j Logger wrapper- Parameters:
logger- the log4j Logger
-
-
Method Details
-
debug
Logs a message object with the DEBUG level. -
debug
Logs a message object with the DEBUG level. -
debug
Logs a message with parameters at the DEBUG level. -
debug
Logs a message with parameters which are only to be constructed if the logging level is the DEBUG level. -
debug
Logs a message at the DEBUG level including the stack trace of theThrowabletpassed as parameter. -
error
Logs a message object with the ERROR level. -
error
Logs a message object with the ERROR level. -
error
Logs a message with parameters at the ERROR level. -
error
Logs a message with parameters which are only to be constructed if the logging level is the ERROR level. -
error
Logs a message at the ERROR level including the stack trace of theThrowabletpassed as parameter. -
fatal
Logs a message object with the FATAL level. -
fatal
Logs a message object with the FATAL level. -
fatal
Logs a message with parameters at the FATAL level. -
fatal
Logs a message with parameters which are only to be constructed if the logging level is the FATAL level. -
fatal
Logs a message at the FATAL level including the stack trace of theThrowabletpassed as parameter. -
getName
Gets the logger name. -
info
Logs a message object with the INFO level. -
info
Logs a message object with the INFO level. -
info
Logs a message with parameters at the INFO level. -
info
Logs a message with parameters which are only to be constructed if the logging level is the INFO level. -
info
Logs a message at the INFO level including the stack trace of theThrowabletpassed as parameter. -
isDebugEnabled
Checks whether this Logger is enabled for the DEBUG Level.- Specified by:
isDebugEnabledin interfaceLog- Returns:
- boolean -
trueif this Logger is enabled for level DEBUG,falseotherwise.
-
isErrorEnabled
Checks whether this Logger is enabled for the ERROR Level.- Specified by:
isErrorEnabledin interfaceLog- Returns:
- boolean -
trueif this Logger is enabled for level ERROR,falseotherwise.
-
isFatalEnabled
Checks whether this Logger is enabled for the FATAL Level.- Specified by:
isFatalEnabledin interfaceLog- Returns:
- boolean -
trueif this Logger is enabled for level FATAL,falseotherwise.
-
isInfoEnabled
Checks whether this Logger is enabled for the INFO Level.- Specified by:
isInfoEnabledin interfaceLog- Returns:
- boolean -
trueif this Logger is enabled for level INFO,falseotherwise.
-
isTraceEnabled
Checks whether this Logger is enabled for the TRACE level.- Specified by:
isTraceEnabledin interfaceLog- Returns:
- boolean -
trueif this Logger is enabled for level TRACE,falseotherwise.
-
isWarnEnabled
Checks whether this Logger is enabled for the WARN Level.- Specified by:
isWarnEnabledin interfaceLog- Returns:
- boolean -
trueif this Logger is enabled for level WARN,falseotherwise.
-
trace
Logs a message object with the TRACE level. -
trace
Logs a message object with the TRACE level. -
trace
Logs a message with parameters at the TRACE level. -
trace
Logs a message with parameters which are only to be constructed if the logging level is the TRACE level. -
trace
Logs a message at the TRACE level including the stack trace of theThrowabletpassed as parameter. -
warn
Logs a message object with the WARN level. -
warn
Logs a message object with the WARN level. -
warn
Logs a message with parameters at the WARN level. -
warn
Logs a message with parameters which are only to be constructed if the logging level is the WARN level. -
warn
Logs a message at the WARN level including the stack trace of theThrowabletpassed as parameter.
-