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.LoggerLogging goes to thisLogKitloggerprotected StringName of this loggerprivate static final longSerializable version identifier. -
Constructor Summary
ConstructorsConstructorDescriptionLogKitLogger(String name) ConstructLogKitLoggerwhich wraps theLogKitlogger with given name. -
Method Summary
Modifier and TypeMethodDescriptionvoidLogs a message withorg.apache.log.Priority.DEBUG.voidLogs a message withorg.apache.log.Priority.DEBUG.voidLogs a message withorg.apache.log.Priority.ERROR.voidLogs a message withorg.apache.log.Priority.ERROR.voidLogs a message withorg.apache.log.Priority.FATAL_ERROR.voidLogs a message withorg.apache.log.Priority.FATAL_ERROR.org.apache.log.LoggerReturn the underlying Logger we are using.voidLogs a message withorg.apache.log.Priority.INFO.voidLogs a message withorg.apache.log.Priority.INFO.booleanChecks whether theLogKitlogger will log messages of priorityDEBUG.booleanChecks whether theLogKitlogger will log messages of priorityERROR.booleanChecks whether theLogKitlogger will log messages of priorityFATAL_ERROR.booleanChecks whether theLogKitlogger will log messages of priorityINFO.booleanChecks whether theLogKitlogger will log messages of priorityDEBUG.booleanChecks whether theLogKitlogger will log messages of priorityWARN.voidLogs a message withorg.apache.log.Priority.DEBUG.voidLogs a message withorg.apache.log.Priority.DEBUG.voidLogs a message withorg.apache.log.Priority.WARN.voidLogs 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 thisLogKitlogger -
name
Name of this logger
-
-
Constructor Details
-
LogKitLogger
ConstructLogKitLoggerwhich wraps theLogKitlogger 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 theLogKitlogger will log messages of priorityDEBUG.- Specified by:
isDebugEnabledin interfaceLog- Returns:
- true if debug is enabled in the underlying logger.
-
isErrorEnabled
public boolean isErrorEnabled()Checks whether theLogKitlogger will log messages of priorityERROR.- Specified by:
isErrorEnabledin interfaceLog- Returns:
- true if error is enabled in the underlying logger.
-
isFatalEnabled
public boolean isFatalEnabled()Checks whether theLogKitlogger will log messages of priorityFATAL_ERROR.- Specified by:
isFatalEnabledin interfaceLog- Returns:
- true if fatal is enabled in the underlying logger.
-
isInfoEnabled
public boolean isInfoEnabled()Checks whether theLogKitlogger will log messages of priorityINFO.- Specified by:
isInfoEnabledin interfaceLog- Returns:
- true if info is enabled in the underlying logger.
-
isTraceEnabled
public boolean isTraceEnabled()Checks whether theLogKitlogger will log messages of priorityDEBUG.- Specified by:
isTraceEnabledin interfaceLog- Returns:
- true if trace is enabled in the underlying logger.
-
isWarnEnabled
public boolean isWarnEnabled()Checks whether theLogKitlogger will log messages of priorityWARN.- Specified by:
isWarnEnabledin interfaceLog- Returns:
- true if warn is enabled in the underlying logger.
-