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
- See Also:
-
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.LoggingSystemProperties
(org.springframework.core.env.Environment environment, Function<String, String> defaultValueResolver, 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) Set a system property.
-
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 ornull
for system properties- Since:
- 2.4.2
-
LoggingSystemProperties
public LoggingSystemProperties(org.springframework.core.env.Environment environment, Function<String, String> defaultValueResolver, BiConsumer<String, String> setter) Create a newLoggingSystemProperties
instance.- Parameters:
environment
- the source environmentdefaultValueResolver
- function used to resolve default values ornull
setter
- setter used to apply the property ornull
for system properties- Since:
- 3.2.0
-
-
Method Details
-
getDefaultCharset
-
apply
public final void apply() -
apply
-
apply
-
setSystemProperty
Set a system property.- Parameters:
name
- the property namevalue
- the value
-