Class JavaLoggingSystem
java.lang.Object
org.springframework.boot.logging.LoggingSystem
org.springframework.boot.logging.AbstractLoggingSystem
org.springframework.boot.logging.java.JavaLoggingSystem
- Since:
 - 1.0.0
 - Author:
 - Phillip Webb, Dave Syer, Andy Wilkinson, Ben Hale
 
- 
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classLoggingSystemFactorythat returnsJavaLoggingSystemif possible.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
EXPECT_CORRELATION_ID_PROPERTY, 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.getLoggerConfiguration(String loggerName) Returns the current configuration for aLoggingSystem's logger.Returns a collection of the current configuration for all aLoggingSystem's loggers.Returns aRunnablethat can handle shutdown of this logging system when the JVM exits.protected String[]Return the standard config locations for this system.Returns a set of theLogLevelsthat are actually supported by the logging system.protected voidloadConfiguration(String location, LogFile logFile) protected voidloadConfiguration(LoggingInitializationContext initializationContext, String location, LogFile logFile) Load a specific configuration.protected voidloadDefaults(LoggingInitializationContext initializationContext, LogFile logFile) Load sensible defaults for the logging system.voidsetLogLevel(String loggerName, LogLevel level) Sets the logging level for a given logger.Methods inherited from class org.springframework.boot.logging.AbstractLoggingSystem
applySystemProperties, getClassLoader, getDefaultLogCorrelationPattern, getDefaultValueResolver, getPackagedConfigFile, getSelfInitializationConfig, getSpringConfigLocations, getSpringInitializationConfig, initialize, reinitializeMethods inherited from class org.springframework.boot.logging.LoggingSystem
get, getSystemProperties 
- 
Constructor Details
- 
JavaLoggingSystem
 
 - 
 - 
Method Details
- 
getStandardConfigLocations
Description copied from class:AbstractLoggingSystemReturn the standard config locations for this system.- Specified by:
 getStandardConfigLocationsin classAbstractLoggingSystem- Returns:
 - the standard config locations
 - See Also:
 
 - 
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
 - 
loadDefaults
Description copied from class:AbstractLoggingSystemLoad sensible defaults for the logging system.- Specified by:
 loadDefaultsin classAbstractLoggingSystem- Parameters:
 initializationContext- the logging initialization contextlogFile- the file to load ornullif no log file is to be written
 - 
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
 - 
loadConfiguration
 - 
getSupportedLogLevels
Description copied from class:LoggingSystemReturns a set of theLogLevelsthat are actually supported by the logging system.- Overrides:
 getSupportedLogLevelsin classLoggingSystem- Returns:
 - the supported levels
 
 - 
setLogLevel
Description copied from class:LoggingSystemSets the logging level for a given logger.- Overrides:
 setLogLevelin classLoggingSystem- Parameters:
 loggerName- the name of the logger to set (nullcan be used for the root logger).level- the log level (nullcan be used to remove any custom level for the logger and use the default configuration instead)
 - 
getLoggerConfigurations
Description copied from class:LoggingSystemReturns a collection of the current configuration for all aLoggingSystem's loggers.- Overrides:
 getLoggerConfigurationsin classLoggingSystem- Returns:
 - the current configurations
 
 - 
getLoggerConfiguration
Description copied from class:LoggingSystemReturns the current configuration for aLoggingSystem's logger.- Overrides:
 getLoggerConfigurationin classLoggingSystem- Parameters:
 loggerName- the name of the logger- Returns:
 - the current configuration
 
 - 
getShutdownHandler
Description copied from class:LoggingSystemReturns aRunnablethat can handle shutdown of this logging system when the JVM exits. The default implementation returnsnull, indicating that no shutdown is required.- Overrides:
 getShutdownHandlerin classLoggingSystem- Returns:
 - the shutdown handler, or 
null 
 - 
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
 
 -