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
ConstructorDescriptionLog4j2LogAdapter
(org.apache.logging.log4j.Logger logger) Construct a Log4j Logger wrapper -
Method Summary
Modifier and TypeMethodDescriptionvoid
Logs a message object with the DEBUG level.void
Logs a message object with the DEBUG level.void
Logs a message with parameters at the DEBUG level.void
Logs a message at the DEBUG level including the stack trace of theThrowable
t
passed as parameter.void
Logs a message with parameters which are only to be constructed if the logging level is the DEBUG level.void
Logs a message object with the ERROR level.void
Logs a message object with the ERROR level.void
Logs a message with parameters at the ERROR level.void
Logs a message at the ERROR level including the stack trace of theThrowable
t
passed as parameter.void
Logs a message with parameters which are only to be constructed if the logging level is the ERROR level.void
Logs a message object with the FATAL level.void
Logs a message object with the FATAL level.void
Logs a message with parameters at the FATAL level.void
Logs a message at the FATAL level including the stack trace of theThrowable
t
passed as parameter.void
Logs a message with parameters which are only to be constructed if the logging level is the FATAL level.getName()
Gets the logger name.void
Logs a message object with the INFO level.void
Logs a message object with the INFO level.void
Logs a message with parameters at the INFO level.void
Logs a message at the INFO level including the stack trace of theThrowable
t
passed as parameter.void
Logs a message with parameters which are only to be constructed if the logging level is the INFO level.boolean
Checks whether this Logger is enabled for the DEBUG Level.boolean
Checks whether this Logger is enabled for the ERROR Level.boolean
Checks whether this Logger is enabled for the FATAL Level.boolean
Checks whether this Logger is enabled for the INFO Level.boolean
Checks whether this Logger is enabled for the TRACE level.boolean
Checks whether this Logger is enabled for the WARN Level.void
Logs a message object with the TRACE level.void
Logs a message object with the TRACE level.void
Logs a message with parameters at the TRACE level.void
Logs a message at the TRACE level including the stack trace of theThrowable
t
passed as parameter.void
Logs a message with parameters which are only to be constructed if the logging level is the TRACE level.void
Logs a message object with the WARN level.void
Logs a message object with the WARN level.void
Logs a message with parameters at the WARN level.void
Logs a message at the WARN level including the stack trace of theThrowable
t
passed as parameter.void
Logs 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 theThrowable
t
passed 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 theThrowable
t
passed 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 theThrowable
t
passed 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 theThrowable
t
passed as parameter. -
isDebugEnabled
Checks whether this Logger is enabled for the DEBUG Level.- Specified by:
isDebugEnabled
in interfaceLog
- Returns:
- boolean -
true
if this Logger is enabled for level DEBUG,false
otherwise.
-
isErrorEnabled
Checks whether this Logger is enabled for the ERROR Level.- Specified by:
isErrorEnabled
in interfaceLog
- Returns:
- boolean -
true
if this Logger is enabled for level ERROR,false
otherwise.
-
isFatalEnabled
Checks whether this Logger is enabled for the FATAL Level.- Specified by:
isFatalEnabled
in interfaceLog
- Returns:
- boolean -
true
if this Logger is enabled for level FATAL,false
otherwise.
-
isInfoEnabled
Checks whether this Logger is enabled for the INFO Level.- Specified by:
isInfoEnabled
in interfaceLog
- Returns:
- boolean -
true
if this Logger is enabled for level INFO,false
otherwise.
-
isTraceEnabled
Checks whether this Logger is enabled for the TRACE level.- Specified by:
isTraceEnabled
in interfaceLog
- Returns:
- boolean -
true
if this Logger is enabled for level TRACE,false
otherwise.
-
isWarnEnabled
Checks whether this Logger is enabled for the WARN Level.- Specified by:
isWarnEnabled
in interfaceLog
- Returns:
- boolean -
true
if this Logger is enabled for level WARN,false
otherwise.
-
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 theThrowable
t
passed 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 theThrowable
t
passed as parameter.
-