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 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.
-
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 theThrowabletpassed 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 theThrowabletpassed 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 theThrowabletpassed 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 theThrowabletpassed 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 -
trueif this Logger is enabled for level DEBUG,falseotherwise.
-
isErrorEnabled
boolean isErrorEnabled()Checks whether this Logger is enabled for the ERROR Level.- Returns:
- boolean -
trueif this Logger is enabled for level ERROR,falseotherwise.
-
isFatalEnabled
boolean isFatalEnabled()Checks whether this Logger is enabled for the FATAL Level.- Returns:
- boolean -
trueif this Logger is enabled for level FATAL,falseotherwise.
-
isInfoEnabled
boolean isInfoEnabled()Checks whether this Logger is enabled for the INFO Level.- Returns:
- boolean -
trueif this Logger is enabled for level INFO,falseotherwise.
-
isTraceEnabled
boolean isTraceEnabled()Checks whether this Logger is enabled for the TRACE level.- Returns:
- boolean -
trueif this Logger is enabled for level TRACE,falseotherwise.
-
isWarnEnabled
boolean isWarnEnabled()Checks whether this Logger is enabled for the WARN Level.- Returns:
- boolean -
trueif this Logger is enabled for level WARN,falseotherwise.
-
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 theThrowabletpassed 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 theThrowabletpassed as parameter.- Parameters:
message- the message object to log.t- the exception to log, including its stack trace.
-