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 SummaryConstructorsConstructorDescriptionLoggingSystemProperties(org.springframework.core.env.Environment environment) Create a newLoggingSystemPropertiesinstance.LoggingSystemProperties(org.springframework.core.env.Environment environment, BiConsumer<String, String> setter) Create a newLoggingSystemPropertiesinstance.LoggingSystemProperties(org.springframework.core.env.Environment environment, Function<String, String> defaultValueResolver, BiConsumer<String, String> setter) Create a newLoggingSystemPropertiesinstance.
- 
Method SummaryModifier and TypeMethodDescriptionfinal voidapply()final voidprotected voidprotected ConsoleReturns theConsoleto use.protected CharsetDeprecated, for removal: This API element is subject to removal in a future version.protected CharsetReturns the default console charset.protected CharsetReturns the default file charset.protected final voidsetSystemProperty(String name, String value) Set a system property.
- 
Constructor Details- 
LoggingSystemPropertiespublic LoggingSystemProperties(org.springframework.core.env.Environment environment) Create a newLoggingSystemPropertiesinstance.- Parameters:
- environment- the source environment
 
- 
LoggingSystemPropertiespublic LoggingSystemProperties(org.springframework.core.env.Environment environment, BiConsumer<String, String> setter) Create a newLoggingSystemPropertiesinstance.- Parameters:
- environment- the source environment
- setter- setter used to apply the property or- nullfor system properties
- Since:
- 2.4.2
 
- 
LoggingSystemPropertiespublic LoggingSystemProperties(org.springframework.core.env.Environment environment, Function<String, String> defaultValueResolver, BiConsumer<String, String> setter) Create a newLoggingSystemPropertiesinstance.- Parameters:
- environment- the source environment
- defaultValueResolver- function used to resolve default values or- null
- setter- setter used to apply the property or- nullfor system properties
- Since:
- 3.2.0
 
 
- 
- 
Method Details- 
getConsoleReturns theConsoleto use.- Returns:
- the Consoleto use
- Since:
- 3.5.0
 
- 
applypublic final void apply()
- 
apply
- 
apply
- 
getDefaultCharsetDeprecated, for removal: This API element is subject to removal in a future version.since 3.5.0 for removal in 4.0.0 in favor ofgetDefaultConsoleCharset()andgetDefaultFileCharset().Returns the default charset.- Returns:
- the default charset
 
- 
getDefaultConsoleCharsetReturns the default console charset.- Returns:
- the default console charset
- Since:
- 3.5.0
 
- 
getDefaultFileCharsetReturns the default file charset.- Returns:
- the default file charset
- Since:
- 3.5.0
 
- 
setSystemPropertySet a system property.- Parameters:
- name- the property name
- value- the value
 
 
- 
getDefaultConsoleCharset()andgetDefaultFileCharset().