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_COMPARATORFields inherited from class org.springframework.boot.logging.LoggingSystem
NONE, ROOT_LOGGER_NAME, SYSTEM_PROPERTY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidReset the logging system to be limit output.voidcleanUp()Clean up the logging system.protected final booleanprotected final booleanReturn whether bridging JUL into SLF4J or not.protected voidloadConfiguration(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, reinitializeMethods 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:LoggingSystemReset 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:
beforeInitializein classAbstractLoggingSystem
-
cleanUp
public void cleanUp()Description copied from class:LoggingSystemClean up the logging system. The default implementation does nothing. Subclasses should override this method to perform any logging system-specific cleanup.- Overrides:
cleanUpin classLoggingSystem
-
loadConfiguration
protected void loadConfiguration(LoggingInitializationContext initializationContext, String location, LogFile logFile) Description copied from class:AbstractLoggingSystemLoad a specific configuration.- Specified by:
loadConfigurationin classAbstractLoggingSystem- Parameters:
initializationContext- the logging initialization contextlocation- the location of the configuration to load (nevernull)logFile- the file to load ornullif 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()
-