|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.entityfs.support.log.clog.CommonsLoggingLogAdapter
public final class CommonsLoggingLogAdapter
This LogAdapter
implementation logs all messages to a Commons Logging
Log
with the name "org.entityfs.log". (The Log
can be
overridden by calling setLog(String)
.
The log adapter levels are mapped to Commons Logging levels like this (
LogAdapter
levels to the left):
SEVERE
-> FATAL
ERROR
-> ERROR
WARNING
-> WARN
INFO
-> INFO
DEBUG
-> DEBUG
FINER
-> DEBUG
TRACE
-> TRACE
The log level cannot be set by calling setLevel(Level)
.
Configure Commons Logging directly instead.
Field Summary | |
---|---|
static String |
DEFAULT_LOG_NAME
The default name of the Commons Logging Log object that the
adapter logs to. |
Constructor Summary | |
---|---|
CommonsLoggingLogAdapter()
|
Method Summary | |
---|---|
boolean |
isDebugEnabled()
Will messages with the level DEBUG be logged? |
boolean |
isErrorEnabled()
Will messages with the level ERROR be logged? |
boolean |
isFinerEnabled()
Will messages with the level FINER be logged? |
boolean |
isInfoEnabled()
Will messages with the level INFO be logged? |
boolean |
isSevereEnabled()
Will messages with the level SEVERE be logged? |
boolean |
isTraceEnabled()
Will messages with the level TRACE be logged? |
boolean |
isWarningEnabled()
Will messages with the level WARNING be logged? |
void |
logDebug(Object o)
Log the result of o.toString() with the level DEBUG . |
void |
logDebug(Object o,
Throwable t)
Log the result of o.toString() and the exception's stack trace to
the level DEBUG . |
void |
logDebug(Throwable t)
Log the exception's message and stack trace with the level DEBUG . |
void |
logError(Object o)
Log the result of o.toString() with the level ERROR . |
void |
logError(Object o,
Throwable t)
Log the result of o.toString() and the exception's stack trace to
the level ERROR . |
void |
logError(Throwable t)
Log the exception's message and stack trace with the level ERROR . |
void |
logFiner(Object o)
Log the result of o.toString() with the level FINER . |
void |
logFiner(Object o,
Throwable t)
Log the result of o.toString() and the exception's stack trace to
the level FINER . |
void |
logFiner(Throwable t)
Log the exception's message and stack trace with the level FINER . |
void |
logInfo(Object o)
Log the result of o.toString() with the level INFO . |
void |
logInfo(Object o,
Throwable t)
Log the result of o.toString() and the exception's stack trace to
the level INFO . |
void |
logInfo(Throwable t)
Log the exception's message and stack trace with the level INFO . |
void |
logSevere(Object o)
Log the result of o.toString() with the level SEVERE . |
void |
logSevere(Object o,
Throwable t)
Log the result of o.toString() and the exception's stack trace to
the level SEVERE . |
void |
logSevere(Throwable t)
Log the exception's message and stack trace with the level SEVERE
. |
void |
logTrace(Object o)
Log the result of o.toString() with the level TRACE . |
void |
logTrace(Object o,
Throwable t)
Log the result of o.toString() and the exception's stack trace to
the level TRACE . |
void |
logTrace(Throwable t)
Log the exception's message and stack trace with the level TRACE . |
void |
logWarning(Object o)
Log the result of o.toString() with the level WARNING . |
void |
logWarning(Object o,
Throwable t)
Log the result of o.toString() and the exception's stack trace to
the level WARNING . |
void |
logWarning(Throwable t)
Log the exception's message and stack trace with the level WARNING . |
void |
setLevel(Level l)
This cannot be used to set the log level. |
void |
setLog(String name)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String DEFAULT_LOG_NAME
Log
object that the
adapter logs to.
Constructor Detail |
---|
public CommonsLoggingLogAdapter()
Method Detail |
---|
public void setLog(String name)
public boolean isDebugEnabled()
LogAdapter
DEBUG
be logged?
isDebugEnabled
in interface LogAdapter
true
if messages with the level DEBUG
will be
logged, false
otherwise.public boolean isErrorEnabled()
LogAdapter
ERROR
be logged?
isErrorEnabled
in interface LogAdapter
true
if messages with the level ERROR
will be
logged, false
otherwise.public boolean isFinerEnabled()
LogAdapter
FINER
be logged?
isFinerEnabled
in interface LogAdapter
true
if messages with the level FINER
will be
logged, false
otherwise.public boolean isInfoEnabled()
LogAdapter
INFO
be logged?
isInfoEnabled
in interface LogAdapter
true
if messages with the level INFO
will be
logged, false
otherwise.public boolean isSevereEnabled()
LogAdapter
SEVERE
be logged?
isSevereEnabled
in interface LogAdapter
true
if messages with the level SEVERE
will be
logged, false
otherwise.public boolean isTraceEnabled()
LogAdapter
TRACE
be logged?
isTraceEnabled
in interface LogAdapter
true
if messages with the level TRACE
will be
logged, false
otherwise.public boolean isWarningEnabled()
LogAdapter
WARNING
be logged?
isWarningEnabled
in interface LogAdapter
true
if messages with the level WARNING
will be
logged, false
otherwise.public void logFiner(Object o)
LogAdapter
o.toString()
with the level FINER
.
logFiner
in interface LogAdapter
o
- The object to log.public void logFiner(Throwable t)
LogAdapter
FINER
.
logFiner
in interface LogAdapter
t
- The exception to log.public void logFiner(Object o, Throwable t)
LogAdapter
o.toString()
and the exception's stack trace to
the level FINER
.
logFiner
in interface LogAdapter
o
- The object to log.t
- The exception to log.public void logDebug(Object o)
LogAdapter
o.toString()
with the level DEBUG
.
logDebug
in interface LogAdapter
o
- The object to log.public void logDebug(Throwable t)
LogAdapter
DEBUG
.
logDebug
in interface LogAdapter
t
- The exception to log.public void logDebug(Object o, Throwable t)
LogAdapter
o.toString()
and the exception's stack trace to
the level DEBUG
.
logDebug
in interface LogAdapter
o
- The object to log.t
- The exception to log.public void logError(Object o)
LogAdapter
o.toString()
with the level ERROR
.
logError
in interface LogAdapter
o
- The object to log.public void logError(Throwable t)
LogAdapter
ERROR
.
logError
in interface LogAdapter
t
- The exception to log.public void logError(Object o, Throwable t)
LogAdapter
o.toString()
and the exception's stack trace to
the level ERROR
.
logError
in interface LogAdapter
o
- The object to log.t
- The exception to log.public void logInfo(Object o)
LogAdapter
o.toString()
with the level INFO
.
logInfo
in interface LogAdapter
o
- The object to log.public void logInfo(Throwable t)
LogAdapter
INFO
.
logInfo
in interface LogAdapter
t
- The exception to log.public void logInfo(Object o, Throwable t)
LogAdapter
o.toString()
and the exception's stack trace to
the level INFO
.
logInfo
in interface LogAdapter
o
- The object to log.t
- The exception to log.public void logSevere(Object o)
LogAdapter
o.toString()
with the level SEVERE
.
logSevere
in interface LogAdapter
o
- The object to log.public void logSevere(Throwable t)
LogAdapter
SEVERE
.
logSevere
in interface LogAdapter
t
- The exception to log.public void logSevere(Object o, Throwable t)
LogAdapter
o.toString()
and the exception's stack trace to
the level SEVERE
.
logSevere
in interface LogAdapter
o
- The object to log.t
- The exception to log.public void logTrace(Object o)
LogAdapter
o.toString()
with the level TRACE
.
logTrace
in interface LogAdapter
o
- The object to log.public void logTrace(Throwable t)
LogAdapter
TRACE
.
logTrace
in interface LogAdapter
t
- The exception to log.public void logTrace(Object o, Throwable t)
LogAdapter
o.toString()
and the exception's stack trace to
the level TRACE
.
logTrace
in interface LogAdapter
o
- The object to log.t
- The exception to log.public void logWarning(Object o)
LogAdapter
o.toString()
with the level WARNING
.
logWarning
in interface LogAdapter
o
- The object to log.public void logWarning(Throwable t)
LogAdapter
WARNING
.
logWarning
in interface LogAdapter
t
- The exception to log.public void logWarning(Object o, Throwable t)
LogAdapter
o.toString()
and the exception's stack trace to
the level WARNING
.
logWarning
in interface LogAdapter
o
- The object to log.t
- The exception to log.public void setLevel(Level l)
setLevel
in interface LogAdapter
l
- The level.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |