public class LogKitLogger extends Object implements Log, Serializable
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.
Modifier and Type | Field and Description |
---|---|
protected org.apache.log.Logger |
logger
Logging goes to this
LogKit logger |
protected String |
name
Name of this logger
|
Constructor and Description |
---|
LogKitLogger(String name)
Construct
LogKitLogger which wraps the LogKit
logger with given name. |
Modifier and Type | Method and Description |
---|---|
void |
debug(Object message)
Logs a message with
org.apache.log.Priority.DEBUG . |
void |
debug(Object message,
Throwable t)
Logs a message with
org.apache.log.Priority.DEBUG . |
void |
error(Object message)
Logs a message with
org.apache.log.Priority.ERROR . |
void |
error(Object message,
Throwable t)
Logs a message with
org.apache.log.Priority.ERROR . |
void |
fatal(Object message)
Logs a message with
org.apache.log.Priority.FATAL_ERROR . |
void |
fatal(Object message,
Throwable t)
Logs a message with
org.apache.log.Priority.FATAL_ERROR . |
org.apache.log.Logger |
getLogger()
Return the underlying Logger we are using.
|
void |
info(Object message)
Logs a message with
org.apache.log.Priority.INFO . |
void |
info(Object message,
Throwable t)
Logs a message with
org.apache.log.Priority.INFO . |
boolean |
isDebugEnabled()
Checks whether the
LogKit logger will log messages of priority DEBUG . |
boolean |
isErrorEnabled()
Checks whether the
LogKit logger will log messages of priority ERROR . |
boolean |
isFatalEnabled()
Checks whether the
LogKit logger will log messages of priority FATAL_ERROR . |
boolean |
isInfoEnabled()
Checks whether the
LogKit logger will log messages of priority INFO . |
boolean |
isTraceEnabled()
Checks whether the
LogKit logger will log messages of priority DEBUG . |
boolean |
isWarnEnabled()
Checks whether the
LogKit logger will log messages of priority WARN . |
void |
trace(Object message)
Logs a message with
org.apache.log.Priority.DEBUG . |
void |
trace(Object message,
Throwable t)
Logs a message with
org.apache.log.Priority.DEBUG . |
void |
warn(Object message)
Logs a message with
org.apache.log.Priority.WARN . |
void |
warn(Object message,
Throwable t)
Logs a message with
org.apache.log.Priority.WARN . |
protected transient volatile org.apache.log.Logger logger
LogKit
loggerpublic LogKitLogger(String name)
LogKitLogger
which wraps the LogKit
logger with given name.name
- log namepublic org.apache.log.Logger getLogger()
public void trace(Object message)
org.apache.log.Priority.DEBUG
.trace
in interface Log
message
- to logLog.trace(Object)
public void trace(Object message, Throwable t)
org.apache.log.Priority.DEBUG
.trace
in interface Log
message
- to logt
- log this causeLog.trace(Object, Throwable)
public void debug(Object message)
org.apache.log.Priority.DEBUG
.debug
in interface Log
message
- to logLog.debug(Object)
public void debug(Object message, Throwable t)
org.apache.log.Priority.DEBUG
.debug
in interface Log
message
- to logt
- log this causeLog.debug(Object, Throwable)
public void info(Object message)
org.apache.log.Priority.INFO
.info
in interface Log
message
- to logLog.info(Object)
public void info(Object message, Throwable t)
org.apache.log.Priority.INFO
.info
in interface Log
message
- to logt
- log this causeLog.info(Object, Throwable)
public void warn(Object message)
org.apache.log.Priority.WARN
.warn
in interface Log
message
- to logLog.warn(Object)
public void warn(Object message, Throwable t)
org.apache.log.Priority.WARN
.warn
in interface Log
message
- to logt
- log this causeLog.warn(Object, Throwable)
public void error(Object message)
org.apache.log.Priority.ERROR
.error
in interface Log
message
- to logLog.error(Object)
public void error(Object message, Throwable t)
org.apache.log.Priority.ERROR
.error
in interface Log
message
- to logt
- log this causeLog.error(Object, Throwable)
public void fatal(Object message)
org.apache.log.Priority.FATAL_ERROR
.fatal
in interface Log
message
- to logLog.fatal(Object)
public void fatal(Object message, Throwable t)
org.apache.log.Priority.FATAL_ERROR
.fatal
in interface Log
message
- to logt
- log this causeLog.fatal(Object, Throwable)
public boolean isDebugEnabled()
LogKit
logger will log messages of priority DEBUG
.isDebugEnabled
in interface Log
public boolean isErrorEnabled()
LogKit
logger will log messages of priority ERROR
.isErrorEnabled
in interface Log
public boolean isFatalEnabled()
LogKit
logger will log messages of priority FATAL_ERROR
.isFatalEnabled
in interface Log
public boolean isInfoEnabled()
LogKit
logger will log messages of priority INFO
.isInfoEnabled
in interface Log
public boolean isTraceEnabled()
LogKit
logger will log messages of priority DEBUG
.isTraceEnabled
in interface Log
public boolean isWarnEnabled()
LogKit
logger will log messages of priority WARN
.isWarnEnabled
in interface Log
Copyright © 2001–2014 The Apache Software Foundation. All rights reserved.