Package org.springframework.boot.logging
Class Slf4JLoggingSystem
java.lang.Object
org.springframework.boot.logging.LoggingSystem
org.springframework.boot.logging.AbstractLoggingSystem
org.springframework.boot.logging.Slf4JLoggingSystem
- Direct Known Subclasses:
Log4J2LoggingSystem
,LogbackLoggingSystem
Abstract base class for
LoggingSystem
implementations that utilize SLF4J.- Since:
- 1.2.0
- Author:
- Andy Wilkinson
-
Nested Class Summary
Nested classes/interfaces inherited from class org.springframework.boot.logging.AbstractLoggingSystem
AbstractLoggingSystem.LogLevels<T>
-
Field Summary
Fields inherited from class org.springframework.boot.logging.AbstractLoggingSystem
CONFIGURATION_COMPARATOR
Fields inherited from class org.springframework.boot.logging.LoggingSystem
NONE, ROOT_LOGGER_NAME, SYSTEM_PROPERTY
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Reset the logging system to be limit output.void
cleanUp()
Clean up the logging system.protected final boolean
protected final boolean
Return whether bridging JUL into SLF4J or not.protected void
loadConfiguration
(LoggingInitializationContext initializationContext, String location, LogFile logFile) Load a specific configuration.Methods inherited from class org.springframework.boot.logging.AbstractLoggingSystem
applySystemProperties, getClassLoader, getPackagedConfigFile, getSelfInitializationConfig, getSpringConfigLocations, getSpringInitializationConfig, getStandardConfigLocations, initialize, loadDefaults, reinitialize
Methods inherited from class org.springframework.boot.logging.LoggingSystem
get, getLoggerConfiguration, getLoggerConfigurations, getShutdownHandler, getSupportedLogLevels, getSystemProperties, setLogLevel
-
Constructor Details
-
Slf4JLoggingSystem
-
-
Method Details
-
beforeInitialize
public void beforeInitialize()Description copied from class:LoggingSystem
Reset the logging system to be limit output. This method may be called beforeLoggingSystem.initialize(LoggingInitializationContext, String, LogFile)
to reduce logging noise until the system has been fully initialized.- Overrides:
beforeInitialize
in classAbstractLoggingSystem
-
cleanUp
public void cleanUp()Description copied from class:LoggingSystem
Clean up the logging system. The default implementation does nothing. Subclasses should override this method to perform any logging system-specific cleanup.- Overrides:
cleanUp
in classLoggingSystem
-
loadConfiguration
protected void loadConfiguration(LoggingInitializationContext initializationContext, String location, LogFile logFile) Description copied from class:AbstractLoggingSystem
Load a specific configuration.- Specified by:
loadConfiguration
in classAbstractLoggingSystem
- Parameters:
initializationContext
- the logging initialization contextlocation
- the location of the configuration to load (nevernull
)logFile
- the file to load ornull
if no log file is to be written
-
isBridgeJulIntoSlf4j
protected final boolean isBridgeJulIntoSlf4j()Return whether bridging JUL into SLF4J or not.- Returns:
- whether bridging JUL into SLF4J or not
- Since:
- 2.0.4
-
isBridgeHandlerAvailable
protected final boolean isBridgeHandlerAvailable()
-