Class Overview
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.
Summary
Fields |
protected
Logger |
logger |
Logging goes to this LogKit logger |
protected
String |
name |
Name of this logger |
Public Constructors |
|
LogKitLogger(String name)
Construct LogKitLogger which wraps the LogKit
logger with given name.
|
Public Methods |
void
|
debug(Object message, Throwable t)
Logs a message with org.apache.log.Priority.DEBUG .
|
void
|
debug(Object message)
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 .
|
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, Throwable t)
Logs a message with org.apache.log.Priority.WARN .
|
void
|
warn(Object message)
Logs a message with org.apache.log.Priority.WARN .
|
[Expand]
Inherited Methods |
From class
java.lang.Object
Object
|
clone()
|
boolean
|
equals(Object arg0)
|
void
|
finalize()
|
final
Class<?>
|
getClass()
|
int
|
hashCode()
|
final
void
|
notify()
|
final
void
|
notifyAll()
|
String
|
toString()
|
final
void
|
wait()
|
final
void
|
wait(long arg0, int arg1)
|
final
void
|
wait(long arg0)
|
|
From interface
org.apache.commons.logging.Log
abstract
void
|
debug(Object message, Throwable t)
Log an error with debug log level.
|
abstract
void
|
debug(Object message)
Log a message with debug log level.
|
abstract
void
|
error(Object message)
Log a message with error log level.
|
abstract
void
|
error(Object message, Throwable t)
Log an error with error log level.
|
abstract
void
|
fatal(Object message)
Log a message with fatal log level.
|
abstract
void
|
fatal(Object message, Throwable t)
Log an error with fatal log level.
|
abstract
void
|
info(Object message)
Log a message with info log level.
|
abstract
void
|
info(Object message, Throwable t)
Log an error with info log level.
|
abstract
boolean
|
isDebugEnabled()
Is debug logging currently enabled?
Call this method to prevent having to perform expensive operations
(for example, String concatenation)
when the log level is more than debug.
|
abstract
boolean
|
isErrorEnabled()
Is error logging currently enabled?
Call this method to prevent having to perform expensive operations
(for example, String concatenation)
when the log level is more than error.
|
abstract
boolean
|
isFatalEnabled()
Is fatal logging currently enabled?
Call this method to prevent having to perform expensive operations
(for example, String concatenation)
when the log level is more than fatal.
|
abstract
boolean
|
isInfoEnabled()
Is info logging currently enabled?
Call this method to prevent having to perform expensive operations
(for example, String concatenation)
when the log level is more than info.
|
abstract
boolean
|
isTraceEnabled()
Is trace logging currently enabled?
Call this method to prevent having to perform expensive operations
(for example, String concatenation)
when the log level is more than trace.
|
abstract
boolean
|
isWarnEnabled()
Is warn logging currently enabled?
Call this method to prevent having to perform expensive operations
(for example, String concatenation)
when the log level is more than warn.
|
abstract
void
|
trace(Object message)
Log a message with trace log level.
|
abstract
void
|
trace(Object message, Throwable t)
Log an error with trace log level.
|
abstract
void
|
warn(Object message, Throwable t)
Log an error with warn log level.
|
abstract
void
|
warn(Object message)
Log a message with warn log level.
|
|
Fields
protected
Logger
logger
Logging goes to this LogKit
logger
Public Constructors
public
LogKitLogger
(String name)
Construct LogKitLogger
which wraps the LogKit
logger with given name.
Public Methods
public
void
debug
(Object message, Throwable t)
Logs a message with org.apache.log.Priority.DEBUG
.
Parameters
message
| to log |
t
| log this cause |
public
void
debug
(Object message)
Logs a message with org.apache.log.Priority.DEBUG
.
public
void
error
(Object message)
Logs a message with org.apache.log.Priority.ERROR
.
public
void
error
(Object message, Throwable t)
Logs a message with org.apache.log.Priority.ERROR
.
Parameters
message
| to log |
t
| log this cause |
public
void
fatal
(Object message)
Logs a message with org.apache.log.Priority.FATAL_ERROR
.
public
void
fatal
(Object message, Throwable t)
Logs a message with org.apache.log.Priority.FATAL_ERROR
.
Parameters
message
| to log |
t
| log this cause |
public
Logger
getLogger
()
Return the underlying Logger we are using.
public
void
info
(Object message)
Logs a message with org.apache.log.Priority.INFO
.
public
void
info
(Object message, Throwable t)
Logs a message with org.apache.log.Priority.INFO
.
Parameters
message
| to log |
t
| log this cause |
public
boolean
isDebugEnabled
()
Checks whether the LogKit
logger will log messages of priority DEBUG
.
Returns
- true if debug is enabled in the underlying logger.
public
boolean
isErrorEnabled
()
Checks whether the LogKit
logger will log messages of priority ERROR
.
Returns
- true if error is enabled in the underlying logger.
public
boolean
isFatalEnabled
()
Checks whether the LogKit
logger will log messages of priority FATAL_ERROR
.
Returns
- true if fatal is enabled in the underlying logger.
public
boolean
isInfoEnabled
()
Checks whether the LogKit
logger will log messages of priority INFO
.
Returns
- true if info is enabled in the underlying logger.
public
boolean
isTraceEnabled
()
Checks whether the LogKit
logger will log messages of priority DEBUG
.
Returns
- true if trace is enabled in the underlying logger.
public
boolean
isWarnEnabled
()
Checks whether the LogKit
logger will log messages of priority WARN
.
Returns
- true if warn is enabled in the underlying logger.
public
void
trace
(Object message)
Logs a message with org.apache.log.Priority.DEBUG
.
public
void
trace
(Object message, Throwable t)
Logs a message with org.apache.log.Priority.DEBUG
.
Parameters
message
| to log |
t
| log this cause |
public
void
warn
(Object message, Throwable t)
Logs a message with org.apache.log.Priority.WARN
.
Parameters
message
| to log |
t
| log this cause |
public
void
warn
(Object message)
Logs a message with org.apache.log.Priority.WARN
.