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
- Author:
- Andy Wilkinson, Phillip Webb, Madhura Bhave, Vedran Pavic, Robert Thornton, EddĂș MelĂ©ndez, Jonatan Ivanov
- See Also:
-
Constructor Summary
ConstructorDescriptionLoggingSystemProperties
(Environment environment) Create a newLoggingSystemProperties
instance.LoggingSystemProperties
(Environment environment, BiConsumer<String, String> setter) Create a newLoggingSystemProperties
instance.LoggingSystemProperties
(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
apply
(LogFile logFile, PropertyResolver resolver) protected Charset
protected final void
setSystemProperty
(String name, String value) Set a system property.
-
Constructor Details
-
LoggingSystemProperties
Create a newLoggingSystemProperties
instance.- Parameters:
environment
- the source environment
-
LoggingSystemProperties
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(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
-