public class DeferredLog
extends java.lang.Object
implements org.apache.commons.logging.Log
Log that can be used to store messages that shouldn't be written until
the logging system is fully initialized.| Constructor and Description |
|---|
DeferredLog()
Create a new
DeferredLog instance. |
| Modifier and Type | Method and Description |
|---|---|
void |
debug(java.lang.Object message) |
void |
debug(java.lang.Object message,
java.lang.Throwable t) |
void |
error(java.lang.Object message) |
void |
error(java.lang.Object message,
java.lang.Throwable t) |
void |
fatal(java.lang.Object message) |
void |
fatal(java.lang.Object message,
java.lang.Throwable t) |
void |
info(java.lang.Object message) |
void |
info(java.lang.Object message,
java.lang.Throwable t) |
boolean |
isDebugEnabled() |
boolean |
isErrorEnabled() |
boolean |
isFatalEnabled() |
boolean |
isInfoEnabled() |
boolean |
isTraceEnabled() |
boolean |
isWarnEnabled() |
static org.apache.commons.logging.Log |
replay(org.apache.commons.logging.Log source,
java.lang.Class<?> destination)
Replay from a source log to a destination log when the source is deferred.
|
static org.apache.commons.logging.Log |
replay(org.apache.commons.logging.Log source,
org.apache.commons.logging.Log destination)
Replay from a source log to a destination log when the source is deferred.
|
void |
replayTo(java.lang.Class<?> destination)
Replay deferred logging to the specified destination.
|
void |
replayTo(org.apache.commons.logging.Log destination)
Replay deferred logging to the specified destination.
|
void |
switchTo(java.lang.Class<?> destination)
Switch from deferred logging to immediate logging to the specified destination.
|
void |
switchTo(org.apache.commons.logging.Log destination)
Switch from deferred logging to immediate logging to the specified destination.
|
void |
trace(java.lang.Object message) |
void |
trace(java.lang.Object message,
java.lang.Throwable t) |
void |
warn(java.lang.Object message) |
void |
warn(java.lang.Object message,
java.lang.Throwable t) |
public DeferredLog()
DeferredLog instance.public boolean isTraceEnabled()
isTraceEnabled in interface org.apache.commons.logging.Logpublic boolean isDebugEnabled()
isDebugEnabled in interface org.apache.commons.logging.Logpublic boolean isInfoEnabled()
isInfoEnabled in interface org.apache.commons.logging.Logpublic boolean isWarnEnabled()
isWarnEnabled in interface org.apache.commons.logging.Logpublic boolean isErrorEnabled()
isErrorEnabled in interface org.apache.commons.logging.Logpublic boolean isFatalEnabled()
isFatalEnabled in interface org.apache.commons.logging.Logpublic void trace(java.lang.Object message)
trace in interface org.apache.commons.logging.Logpublic void trace(java.lang.Object message,
java.lang.Throwable t)
trace in interface org.apache.commons.logging.Logpublic void debug(java.lang.Object message)
debug in interface org.apache.commons.logging.Logpublic void debug(java.lang.Object message,
java.lang.Throwable t)
debug in interface org.apache.commons.logging.Logpublic void info(java.lang.Object message)
info in interface org.apache.commons.logging.Logpublic void info(java.lang.Object message,
java.lang.Throwable t)
info in interface org.apache.commons.logging.Logpublic void warn(java.lang.Object message)
warn in interface org.apache.commons.logging.Logpublic void warn(java.lang.Object message,
java.lang.Throwable t)
warn in interface org.apache.commons.logging.Logpublic void error(java.lang.Object message)
error in interface org.apache.commons.logging.Logpublic void error(java.lang.Object message,
java.lang.Throwable t)
error in interface org.apache.commons.logging.Logpublic void fatal(java.lang.Object message)
fatal in interface org.apache.commons.logging.Logpublic void fatal(java.lang.Object message,
java.lang.Throwable t)
fatal in interface org.apache.commons.logging.Logpublic void switchTo(java.lang.Class<?> destination)
destination - the new log destinationpublic void switchTo(org.apache.commons.logging.Log destination)
destination - the new log destinationpublic void replayTo(java.lang.Class<?> destination)
destination - the destination for the deferred log messagespublic void replayTo(org.apache.commons.logging.Log destination)
destination - the destination for the deferred log messagespublic static org.apache.commons.logging.Log replay(org.apache.commons.logging.Log source,
java.lang.Class<?> destination)
source - the source loggerdestination - the destination logger classpublic static org.apache.commons.logging.Log replay(org.apache.commons.logging.Log source,
org.apache.commons.logging.Log destination)
source - the source loggerdestination - the destination logger