Package org.springframework.boot.logging
Class LoggingSystemProperties
java.lang.Object
org.springframework.boot.logging.LoggingSystemProperties
- Direct Known Subclasses:
LogbackLoggingSystemProperties
Utility to set system properties that can later be used by log configuration files.
- Since:
- 2.0.0
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
The name of the System property that contains the console log charset.static final String
The name of the System property that contains the console log pattern.static final String
The name of the System property that contains the exception conversion word.static final String
The name of the System property that contains the file log charset.static final String
The name of the System property that contains the file log pattern.static final String
The name of the System property that contains the log date-format pattern.static final String
The name of the System property that contains the log file.static final String
The name of the System property that contains the log level pattern.static final String
The name of the System property that contains the log path.static final String
The name of the System property that contains the process ID. -
Constructor Summary
ConstructorDescriptionLoggingSystemProperties
(org.springframework.core.env.Environment environment) Create a newLoggingSystemProperties
instance.LoggingSystemProperties
(org.springframework.core.env.Environment environment, BiConsumer<String, String> setter) Create a newLoggingSystemProperties
instance. -
Method Summary
Modifier and TypeMethodDescriptionfinal void
apply()
final void
protected void
protected Charset
protected final void
setSystemProperty
(String name, String value) protected final void
setSystemProperty
(org.springframework.core.env.PropertyResolver resolver, String systemPropertyName, String propertyName) protected final void
setSystemProperty
(org.springframework.core.env.PropertyResolver resolver, String systemPropertyName, String propertyName, String defaultValue)
-
Field Details
-
PID_KEY
The name of the System property that contains the process ID.- See Also:
-
EXCEPTION_CONVERSION_WORD
The name of the System property that contains the exception conversion word.- See Also:
-
LOG_FILE
The name of the System property that contains the log file.- See Also:
-
LOG_PATH
The name of the System property that contains the log path.- See Also:
-
CONSOLE_LOG_PATTERN
The name of the System property that contains the console log pattern.- See Also:
-
CONSOLE_LOG_CHARSET
The name of the System property that contains the console log charset.- See Also:
-
FILE_LOG_PATTERN
The name of the System property that contains the file log pattern.- See Also:
-
FILE_LOG_CHARSET
The name of the System property that contains the file log charset.- See Also:
-
LOG_LEVEL_PATTERN
The name of the System property that contains the log level pattern.- See Also:
-
LOG_DATEFORMAT_PATTERN
The name of the System property that contains the log date-format pattern.- See Also:
-
-
Constructor Details
-
LoggingSystemProperties
public LoggingSystemProperties(org.springframework.core.env.Environment environment) Create a newLoggingSystemProperties
instance.- Parameters:
environment
- the source environment
-
LoggingSystemProperties
public LoggingSystemProperties(org.springframework.core.env.Environment environment, BiConsumer<String, String> setter) Create a newLoggingSystemProperties
instance.- Parameters:
environment
- the source environmentsetter
- setter used to apply the property- Since:
- 2.4.2
-
-
Method Details
-
getDefaultCharset
-
apply
public final void apply() -
apply
-
apply
-
setSystemProperty
-
setSystemProperty
-
setSystemProperty
-