Package org.apache.commons.logging.impl
Class LogKitLogger
java.lang.Object
org.apache.commons.logging.impl.LogKitLogger
- All Implemented Interfaces:
Serializable
,Log
Implementation of
org.apache.commons.logging.Log
that wraps the avalon-logkit
logging system. Configuration of LogKit
is left to the user.
LogKit
accepts only String
messages.
Therefore, this implementation converts object messages into strings
by called their toString()
method before logging them.
- Version:
- $Id: LogKitLogger.java 1448119 2013-02-20 12:28:04Z tn $
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.apache.log.Logger
Logging goes to thisLogKit
loggerprotected String
Name of this loggerprivate static final long
Serializable version identifier. -
Constructor Summary
ConstructorsConstructorDescriptionLogKitLogger
(String name) ConstructLogKitLogger
which wraps theLogKit
logger with given name. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Logs a message withorg.apache.log.Priority.DEBUG
.void
Logs a message withorg.apache.log.Priority.DEBUG
.void
Logs a message withorg.apache.log.Priority.ERROR
.void
Logs a message withorg.apache.log.Priority.ERROR
.void
Logs a message withorg.apache.log.Priority.FATAL_ERROR
.void
Logs a message withorg.apache.log.Priority.FATAL_ERROR
.org.apache.log.Logger
Return the underlying Logger we are using.void
Logs a message withorg.apache.log.Priority.INFO
.void
Logs a message withorg.apache.log.Priority.INFO
.boolean
Checks whether theLogKit
logger will log messages of priorityDEBUG
.boolean
Checks whether theLogKit
logger will log messages of priorityERROR
.boolean
Checks whether theLogKit
logger will log messages of priorityFATAL_ERROR
.boolean
Checks whether theLogKit
logger will log messages of priorityINFO
.boolean
Checks whether theLogKit
logger will log messages of priorityDEBUG
.boolean
Checks whether theLogKit
logger will log messages of priorityWARN
.void
Logs a message withorg.apache.log.Priority.DEBUG
.void
Logs a message withorg.apache.log.Priority.DEBUG
.void
Logs a message withorg.apache.log.Priority.WARN
.void
Logs a message withorg.apache.log.Priority.WARN
.
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDSerializable version identifier.- See Also:
-
logger
protected transient volatile org.apache.log.Logger loggerLogging goes to thisLogKit
logger -
name
Name of this logger
-
-
Constructor Details
-
LogKitLogger
ConstructLogKitLogger
which wraps theLogKit
logger with given name.- Parameters:
name
- log name
-
-
Method Details
-
getLogger
public org.apache.log.Logger getLogger()Return the underlying Logger we are using. -
trace
Logs a message withorg.apache.log.Priority.DEBUG
. -
trace
Logs a message withorg.apache.log.Priority.DEBUG
. -
debug
Logs a message withorg.apache.log.Priority.DEBUG
. -
debug
Logs a message withorg.apache.log.Priority.DEBUG
. -
info
Logs a message withorg.apache.log.Priority.INFO
. -
info
Logs a message withorg.apache.log.Priority.INFO
. -
warn
Logs a message withorg.apache.log.Priority.WARN
. -
warn
Logs a message withorg.apache.log.Priority.WARN
. -
error
Logs a message withorg.apache.log.Priority.ERROR
. -
error
Logs a message withorg.apache.log.Priority.ERROR
. -
fatal
Logs a message withorg.apache.log.Priority.FATAL_ERROR
. -
fatal
Logs a message withorg.apache.log.Priority.FATAL_ERROR
. -
isDebugEnabled
public boolean isDebugEnabled()Checks whether theLogKit
logger will log messages of priorityDEBUG
.- Specified by:
isDebugEnabled
in interfaceLog
- Returns:
- true if debug is enabled in the underlying logger.
-
isErrorEnabled
public boolean isErrorEnabled()Checks whether theLogKit
logger will log messages of priorityERROR
.- Specified by:
isErrorEnabled
in interfaceLog
- Returns:
- true if error is enabled in the underlying logger.
-
isFatalEnabled
public boolean isFatalEnabled()Checks whether theLogKit
logger will log messages of priorityFATAL_ERROR
.- Specified by:
isFatalEnabled
in interfaceLog
- Returns:
- true if fatal is enabled in the underlying logger.
-
isInfoEnabled
public boolean isInfoEnabled()Checks whether theLogKit
logger will log messages of priorityINFO
.- Specified by:
isInfoEnabled
in interfaceLog
- Returns:
- true if info is enabled in the underlying logger.
-
isTraceEnabled
public boolean isTraceEnabled()Checks whether theLogKit
logger will log messages of priorityDEBUG
.- Specified by:
isTraceEnabled
in interfaceLog
- Returns:
- true if trace is enabled in the underlying logger.
-
isWarnEnabled
public boolean isWarnEnabled()Checks whether theLogKit
logger will log messages of priorityWARN
.- Specified by:
isWarnEnabled
in interfaceLog
- Returns:
- true if warn is enabled in the underlying logger.
-