public class DeferredLog extends 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() |
Modifier and Type | Method and Description |
---|---|
void |
debug(Object message) |
void |
debug(Object message,
Throwable t) |
void |
error(Object message) |
void |
error(Object message,
Throwable t) |
void |
fatal(Object message) |
void |
fatal(Object message,
Throwable t) |
void |
info(Object message) |
void |
info(Object message,
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,
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(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(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(Object message) |
void |
trace(Object message,
Throwable t) |
void |
warn(Object message) |
void |
warn(Object message,
Throwable t) |
public boolean isTraceEnabled()
isTraceEnabled
in interface org.apache.commons.logging.Log
public boolean isDebugEnabled()
isDebugEnabled
in interface org.apache.commons.logging.Log
public boolean isInfoEnabled()
isInfoEnabled
in interface org.apache.commons.logging.Log
public boolean isWarnEnabled()
isWarnEnabled
in interface org.apache.commons.logging.Log
public boolean isErrorEnabled()
isErrorEnabled
in interface org.apache.commons.logging.Log
public boolean isFatalEnabled()
isFatalEnabled
in interface org.apache.commons.logging.Log
public void trace(Object message)
trace
in interface org.apache.commons.logging.Log
public void trace(Object message, Throwable t)
trace
in interface org.apache.commons.logging.Log
public void debug(Object message)
debug
in interface org.apache.commons.logging.Log
public void debug(Object message, Throwable t)
debug
in interface org.apache.commons.logging.Log
public void info(Object message)
info
in interface org.apache.commons.logging.Log
public void info(Object message, Throwable t)
info
in interface org.apache.commons.logging.Log
public void warn(Object message)
warn
in interface org.apache.commons.logging.Log
public void warn(Object message, Throwable t)
warn
in interface org.apache.commons.logging.Log
public void error(Object message)
error
in interface org.apache.commons.logging.Log
public void error(Object message, Throwable t)
error
in interface org.apache.commons.logging.Log
public void fatal(Object message)
fatal
in interface org.apache.commons.logging.Log
public void fatal(Object message, Throwable t)
fatal
in interface org.apache.commons.logging.Log
public void switchTo(Class<?> destination)
destination
- the new log destinationpublic void switchTo(org.apache.commons.logging.Log destination)
destination
- the new log destinationpublic void replayTo(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, 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 loggerCopyright © 2018 Pivotal Software, Inc.. All rights reserved.