类 AbstractLoggingSystem
java.lang.Object
org.springframework.boot.logging.LoggingSystem
org.springframework.boot.logging.AbstractLoggingSystem
Abstract base class for
LoggingSystem
implementations.- 从以下版本开始:
- 1.0.0
- 作者:
- Phillip Webb, Dave Syer
-
嵌套类概要
嵌套类 -
字段概要
字段从类继承的字段 org.springframework.boot.logging.LoggingSystem
EXPECT_CORRELATION_ID_PROPERTY, NONE, ROOT_LOGGER_NAME, SYSTEM_PROPERTY
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明protected final void
applySystemProperties
(Environment environment, LogFile logFile) void
Reset the logging system to be limit output.protected final ClassLoader
protected String
Return the default log correlation pattern ornull
if log correlation patterns are not supported.getDefaultValueResolver
(Environment environment) Return the default value resolver to use when resolving system properties.protected final String
getPackagedConfigFile
(String fileName) protected String
Return any self initialization config that has been applied.protected String[]
Return the spring config locations for this system.protected String
Return any spring specific initialization config that should be applied.protected abstract String[]
Return the standard config locations for this system.void
initialize
(LoggingInitializationContext initializationContext, String configLocation, LogFile logFile) Fully initialize the logging system.protected abstract void
loadConfiguration
(LoggingInitializationContext initializationContext, String location, LogFile logFile) Load a specific configuration.protected abstract void
loadDefaults
(LoggingInitializationContext initializationContext, LogFile logFile) Load sensible defaults for the logging system.protected void
reinitialize
(LoggingInitializationContext initializationContext) Reinitialize the logging system if required.从类继承的方法 org.springframework.boot.logging.LoggingSystem
cleanUp, get, getLoggerConfiguration, getLoggerConfigurations, getShutdownHandler, getSupportedLogLevels, getSystemProperties, setLogLevel
-
字段详细资料
-
CONFIGURATION_COMPARATOR
-
-
构造器详细资料
-
AbstractLoggingSystem
-
-
方法详细资料
-
beforeInitialize
public void beforeInitialize()从类复制的说明: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.- 指定者:
beforeInitialize
在类中LoggingSystem
-
initialize
public void initialize(LoggingInitializationContext initializationContext, String configLocation, LogFile logFile) 从类复制的说明:LoggingSystem
Fully initialize the logging system.- 覆盖:
initialize
在类中LoggingSystem
- 参数:
initializationContext
- the logging initialization contextconfigLocation
- a log configuration location ornull
if default initialization is requiredlogFile
- the log output file that should be written ornull
for console only output
-
getSelfInitializationConfig
Return any self initialization config that has been applied. By default this method checksgetStandardConfigLocations()
and assumes that any file that exists will have been applied.- 返回:
- the self initialization config or
null
-
getSpringInitializationConfig
Return any spring specific initialization config that should be applied. By default this method checksgetSpringConfigLocations()
.- 返回:
- the spring initialization config or
null
-
getStandardConfigLocations
Return the standard config locations for this system.- 返回:
- the standard config locations
- 另请参阅:
-
getSpringConfigLocations
Return the spring config locations for this system. By default this method returns a set of locations based ongetStandardConfigLocations()
.- 返回:
- the spring config locations
- 另请参阅:
-
loadDefaults
protected abstract void loadDefaults(LoggingInitializationContext initializationContext, LogFile logFile) Load sensible defaults for the logging system.- 参数:
initializationContext
- the logging initialization contextlogFile
- the file to load ornull
if no log file is to be written
-
loadConfiguration
protected abstract void loadConfiguration(LoggingInitializationContext initializationContext, String location, LogFile logFile) Load a specific configuration.- 参数:
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
-
reinitialize
Reinitialize the logging system if required. Called whengetSelfInitializationConfig()
is used and the log file hasn't changed. May be used to reload configuration (for example to pick up additional System properties).- 参数:
initializationContext
- the logging initialization context
-
getClassLoader
-
getPackagedConfigFile
-
applySystemProperties
-
getDefaultValueResolver
Return the default value resolver to use when resolving system properties.- 参数:
environment
- the environment- 返回:
- the default value resolver
- 从以下版本开始:
- 3.2.0
-
getDefaultLogCorrelationPattern
Return the default log correlation pattern ornull
if log correlation patterns are not supported.- 返回:
- the default log correlation pattern
- 从以下版本开始:
- 3.2.0
-