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 newLoggingSystemPropertiesinstance.LoggingSystemProperties(Environment environment, @Nullable BiConsumer<String, @Nullable String> setter) Create a newLoggingSystemPropertiesinstance.LoggingSystemProperties(Environment environment, @Nullable Function<@Nullable String, @Nullable String> defaultValueResolver, @Nullable BiConsumer<String, @Nullable String> setter) Create a newLoggingSystemPropertiesinstance. - 
Method Summary
Modifier and TypeMethodDescriptionfinal voidapply()final voidprotected voidapply(@Nullable LogFile logFile, PropertyResolver resolver) protected @Nullable ConsoleReturns theConsoleto use.protected CharsetReturns the default console charset.protected CharsetReturns the default file charset.protected final voidsetSystemProperty(String name, @Nullable String value) Set a system property. 
- 
Constructor Details
- 
LoggingSystemProperties
Create a newLoggingSystemPropertiesinstance.- Parameters:
 environment- the source environment
 - 
LoggingSystemProperties
public LoggingSystemProperties(Environment environment, @Nullable BiConsumer<String, @Nullable String> setter) Create a newLoggingSystemPropertiesinstance.- Parameters:
 environment- the source environmentsetter- setter used to apply the property ornullfor system properties- Since:
 - 2.4.2
 
 - 
LoggingSystemProperties
public LoggingSystemProperties(Environment environment, @Nullable Function<@Nullable String, @Nullable String> defaultValueResolver, @Nullable BiConsumer<String, @Nullable String> setter) Create a newLoggingSystemPropertiesinstance.- Parameters:
 environment- the source environmentdefaultValueResolver- function used to resolve default values ornullsetter- setter used to apply the property ornullfor 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
 
 -