Package org.apache.commons.jcs3.log
Interface Log
- All Known Implementing Classes:
JulLogAdapter
,Log4j2LogAdapter
public interface Log
This is a borrowed and stripped-down version of the log4j2 Logger interface.
All logging operations, except configuration, are done through this interface.
The canonical way to obtain a Logger for a class is through LogManager.getLog(String)
}.
Typically, each class should get its own Log named after its fully qualified class name
public class MyClass { private static final Log log = LogManager.getLog(MyClass.class); // ... }
-
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.
-
Method Details
-
debug
Logs a message object with the DEBUG level.- Parameters:
message
- the message string to log.
-
debug
Logs a message object with the DEBUG level.- Parameters:
message
- the message object to log.
-
debug
Logs a message with parameters at the DEBUG level.- Parameters:
message
- the message to log; the format depends on the message factory.params
- parameters to the message.
-
debug
Logs a message with parameters which are only to be constructed if the logging level is the DEBUG level.- Parameters:
message
- the message to log; the format depends on the message factory.paramSuppliers
- An array of functions, which when called, produce the desired log message parameters.
-
debug
Logs a message at the DEBUG level including the stack trace of theThrowable
t
passed as parameter.- Parameters:
message
- the message to log.t
- the exception to log, including its stack trace.
-
error
Logs a message object with the ERROR level.- Parameters:
message
- the message string to log.
-
error
Logs a message object with the ERROR level.- Parameters:
message
- the message object to log.
-
error
Logs a message with parameters at the ERROR level.- Parameters:
message
- the message to log; the format depends on the message factory.params
- parameters to the message.
-
error
Logs a message with parameters which are only to be constructed if the logging level is the ERROR level.- Parameters:
message
- the message to log; the format depends on the message factory.paramSuppliers
- An array of functions, which when called, produce the desired log message parameters.
-
error
Logs a message at the ERROR level including the stack trace of theThrowable
t
passed as parameter.- Parameters:
message
- the message object to log.t
- the exception to log, including its stack trace.
-
fatal
Logs a message object with the FATAL level.- Parameters:
message
- the message string to log.
-
fatal
Logs a message object with the FATAL level.- Parameters:
message
- the message object to log.
-
fatal
Logs a message with parameters at the FATAL level.- Parameters:
message
- the message to log; the format depends on the message factory.params
- parameters to the message.
-
fatal
Logs a message with parameters which are only to be constructed if the logging level is the FATAL level.- Parameters:
message
- the message to log; the format depends on the message factory.paramSuppliers
- An array of functions, which when called, produce the desired log message parameters.
-
fatal
Logs a message at the FATAL level including the stack trace of theThrowable
t
passed as parameter.- Parameters:
message
- the message object to log.t
- the exception to log, including its stack trace.
-
getName
Gets the logger name.- Returns:
- the logger name.
-
info
Logs a message object with the INFO level.- Parameters:
message
- the message string to log.
-
info
Logs a message object with the INFO level.- Parameters:
message
- the message object to log.
-
info
Logs a message with parameters at the INFO level.- Parameters:
message
- the message to log; the format depends on the message factory.params
- parameters to the message.
-
info
Logs a message with parameters which are only to be constructed if the logging level is the INFO level.- Parameters:
message
- the message to log; the format depends on the message factory.paramSuppliers
- An array of functions, which when called, produce the desired log message parameters.
-
info
Logs a message at the INFO level including the stack trace of theThrowable
t
passed as parameter.- Parameters:
message
- the message object to log.t
- the exception to log, including its stack trace.
-
isDebugEnabled
boolean isDebugEnabled()Checks whether this Logger is enabled for the DEBUG Level.- Returns:
- boolean -
true
if this Logger is enabled for level DEBUG,false
otherwise.
-
isErrorEnabled
boolean isErrorEnabled()Checks whether this Logger is enabled for the ERROR Level.- Returns:
- boolean -
true
if this Logger is enabled for level ERROR,false
otherwise.
-
isFatalEnabled
boolean isFatalEnabled()Checks whether this Logger is enabled for the FATAL Level.- Returns:
- boolean -
true
if this Logger is enabled for level FATAL,false
otherwise.
-
isInfoEnabled
boolean isInfoEnabled()Checks whether this Logger is enabled for the INFO Level.- Returns:
- boolean -
true
if this Logger is enabled for level INFO,false
otherwise.
-
isTraceEnabled
boolean isTraceEnabled()Checks whether this Logger is enabled for the TRACE level.- Returns:
- boolean -
true
if this Logger is enabled for level TRACE,false
otherwise.
-
isWarnEnabled
boolean isWarnEnabled()Checks whether this Logger is enabled for the WARN Level.- Returns:
- boolean -
true
if this Logger is enabled for level WARN,false
otherwise.
-
trace
Logs a message object with the TRACE level.- Parameters:
message
- the message string to log.
-
trace
Logs a message object with the TRACE level.- Parameters:
message
- the message object to log.
-
trace
Logs a message with parameters at the TRACE level.- Parameters:
message
- the message to log; the format depends on the message factory.params
- parameters to the message.
-
trace
Logs a message with parameters which are only to be constructed if the logging level is the TRACE level.- Parameters:
message
- the message to log; the format depends on the message factory.paramSuppliers
- An array of functions, which when called, produce the desired log message parameters.
-
trace
Logs a message at the TRACE level including the stack trace of theThrowable
t
passed as parameter.- Parameters:
message
- the message object to log.t
- the exception to log, including its stack trace.- See Also:
-
warn
Logs a message object with the WARN level.- Parameters:
message
- the message string to log.
-
warn
Logs a message object with the WARN level.- Parameters:
message
- the message object to log.
-
warn
Logs a message with parameters at the WARN level.- Parameters:
message
- the message to log; the format depends on the message factory.params
- parameters to the message.
-
warn
Logs a message with parameters which are only to be constructed if the logging level is the WARN level.- Parameters:
message
- the message to log; the format depends on the message factory.paramSuppliers
- An array of functions, which when called, produce the desired log message parameters.
-
warn
Logs a message at the WARN level including the stack trace of theThrowable
t
passed as parameter.- Parameters:
message
- the message object to log.t
- the exception to log, including its stack trace.
-