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
ConstructorsConstructorDescriptionLoggingSystemProperties
(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 Console
Returns theConsole
to use.protected Charset
Returns the default console charset.protected Charset
Returns the default file 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
-
getConsole
-
apply
public final void apply() -
apply
-
apply
-
getDefaultConsoleCharset
Returns the default console charset.- Returns:
- the default console charset
- Since:
- 3.5.0
-
getDefaultFileCharset
Returns the default file charset.- Returns:
- the default file charset
- Since:
- 3.5.0
-
setSystemProperty
-