Class DeferredLog
java.lang.Object
org.springframework.boot.logging.DeferredLog
- All Implemented Interfaces:
org.apache.commons.logging.Log
Deferred
Log that can be used to store messages that shouldn't be written until
the logging system is fully initialized.- Since:
- 1.3.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidvoidvoidvoidvoidvoidvoidbooleanbooleanbooleanbooleanbooleanbooleanstatic org.apache.commons.logging.LogReplay from a source log to a destination log when the source is deferred.static org.apache.commons.logging.Logreplay(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.voidReplay deferred logging to the specified destination.voidreplayTo(org.apache.commons.logging.Log destination) Replay deferred logging to the specified destination.voidSwitch from deferred logging to immediate logging to the specified destination.voidswitchTo(org.apache.commons.logging.Log destination) Switch from deferred logging to immediate logging to the specified destination.voidvoidvoidvoid
-
Constructor Details
-
DeferredLog
public DeferredLog()Create a newDeferredLoginstance.
-
-
Method Details
-
isTraceEnabled
public boolean isTraceEnabled()- Specified by:
isTraceEnabledin interfaceorg.apache.commons.logging.Log
-
isDebugEnabled
public boolean isDebugEnabled()- Specified by:
isDebugEnabledin interfaceorg.apache.commons.logging.Log
-
isInfoEnabled
public boolean isInfoEnabled()- Specified by:
isInfoEnabledin interfaceorg.apache.commons.logging.Log
-
isWarnEnabled
public boolean isWarnEnabled()- Specified by:
isWarnEnabledin interfaceorg.apache.commons.logging.Log
-
isErrorEnabled
public boolean isErrorEnabled()- Specified by:
isErrorEnabledin interfaceorg.apache.commons.logging.Log
-
isFatalEnabled
public boolean isFatalEnabled()- Specified by:
isFatalEnabledin interfaceorg.apache.commons.logging.Log
-
trace
- Specified by:
tracein interfaceorg.apache.commons.logging.Log
-
trace
-
debug
- Specified by:
debugin interfaceorg.apache.commons.logging.Log
-
debug
-
info
- Specified by:
infoin interfaceorg.apache.commons.logging.Log
-
info
-
warn
- Specified by:
warnin interfaceorg.apache.commons.logging.Log
-
warn
-
error
- Specified by:
errorin interfaceorg.apache.commons.logging.Log
-
error
-
fatal
- Specified by:
fatalin interfaceorg.apache.commons.logging.Log
-
fatal
-
switchTo
Switch from deferred logging to immediate logging to the specified destination.- Parameters:
destination- the new log destination- Since:
- 2.1.0
-
switchTo
public void switchTo(org.apache.commons.logging.Log destination) Switch from deferred logging to immediate logging to the specified destination.- Parameters:
destination- the new log destination- Since:
- 2.1.0
-
replayTo
Replay deferred logging to the specified destination.- Parameters:
destination- the destination for the deferred log messages
-
replayTo
public void replayTo(org.apache.commons.logging.Log destination) Replay deferred logging to the specified destination.- Parameters:
destination- the destination for the deferred log messages
-
replay
public 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.- Parameters:
source- the source loggerdestination- the destination logger class- Returns:
- the destination
-
replay
public 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.- Parameters:
source- the source loggerdestination- the destination logger- Returns:
- the destination
-