|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface LogAdapter
This is an interface for an adapter to a log system. There are several implementations of this for different logging backends, such as Commons Logging and Java 1.4+ logging.
Clients use this to log messages with different severity levels. Where those messages end up is up to the log adapter implementation used.
The logging levels are
SEVEREERRORWARNINGINFODEBUGFINERTRACE
Compared with other logging adapters, such as Commons Logging, the LogAdapter holds its configuration in object instances, rather than in
static classes. This makes it easier to have several log adapters in
different file systems concurrently without having to invent a way of keeping
the static configuration different. The obvious drawback is that all classes
that wants to log must find the file system's log adapter to do so. Since
most EntityFS classes work against the file system and its entities anyway,
that should not be much of a problem.
A FileSystem has a LogAdapter instance that it,
and all its entities, use for logging. The file system's log adapter is
referenced by the file system's LogAdapterHolder. The log adapter
used by the file system can be changed at any time, but the holder is always
the same instance. The holder object is passed around to other classes that
want to have access to the file system's log adapter. Classes other than the
log adapter holder should not save a reference to the file system's log
adapter since it may become invalid at any time.
The default adapter is Jdk14LogAdapter. It logs all output to a
java.util.logging.Logger.
LogAdapterHolder| 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)
Set the log level. |
| Method Detail |
|---|
void logTrace(Object o)
o.toString() with the level TRACE.
o - The object to log.void logTrace(Throwable t)
TRACE.
t - The exception to log.
void logTrace(Object o,
Throwable t)
o.toString() and the exception's stack trace to
the level TRACE.
o - The object to log.t - The exception to log.void logFiner(Object o)
o.toString() with the level FINER.
o - The object to log.void logFiner(Throwable t)
FINER.
t - The exception to log.
void logFiner(Object o,
Throwable t)
o.toString() and the exception's stack trace to
the level FINER.
o - The object to log.t - The exception to log.void logDebug(Object o)
o.toString() with the level DEBUG.
o - The object to log.void logDebug(Throwable t)
DEBUG.
t - The exception to log.
void logDebug(Object o,
Throwable t)
o.toString() and the exception's stack trace to
the level DEBUG.
o - The object to log.t - The exception to log.void logInfo(Object o)
o.toString() with the level INFO.
o - The object to log.void logInfo(Throwable t)
INFO.
t - The exception to log.
void logInfo(Object o,
Throwable t)
o.toString() and the exception's stack trace to
the level INFO.
o - The object to log.t - The exception to log.void logWarning(Object o)
o.toString() with the level WARNING.
o - The object to log.void logWarning(Throwable t)
WARNING.
t - The exception to log.
void logWarning(Object o,
Throwable t)
o.toString() and the exception's stack trace to
the level WARNING.
o - The object to log.t - The exception to log.void logError(Object o)
o.toString() with the level ERROR.
o - The object to log.void logError(Throwable t)
ERROR.
t - The exception to log.
void logError(Object o,
Throwable t)
o.toString() and the exception's stack trace to
the level ERROR.
o - The object to log.t - The exception to log.void logSevere(Object o)
o.toString() with the level SEVERE.
o - The object to log.void logSevere(Throwable t)
SEVERE
.
t - The exception to log.
void logSevere(Object o,
Throwable t)
o.toString() and the exception's stack trace to
the level SEVERE.
o - The object to log.t - The exception to log.void setLevel(Level l)
java.util.logging.Level class to
define the level. The Level value is translated to the
corresponding logging level in the logging system used by the adapter
implementation. See the documentation for that adapter for how the
mapping is done.
l - The level.boolean isTraceEnabled()
TRACE be logged?
true if messages with the level TRACE will be
logged, false otherwise.boolean isFinerEnabled()
FINER be logged?
true if messages with the level FINER will be
logged, false otherwise.boolean isDebugEnabled()
DEBUG be logged?
true if messages with the level DEBUG will be
logged, false otherwise.boolean isInfoEnabled()
INFO be logged?
true if messages with the level INFO will be
logged, false otherwise.boolean isWarningEnabled()
WARNING be logged?
true if messages with the level WARNING will be
logged, false otherwise.boolean isErrorEnabled()
ERROR be logged?
true if messages with the level ERROR will be
logged, false otherwise.boolean isSevereEnabled()
SEVERE be logged?
true if messages with the level SEVERE will be
logged, false otherwise.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||