类 LoggingSystemProperties
java.lang.Object
org.springframework.boot.logging.LoggingSystemProperties
- 直接已知子类:
LogbackLoggingSystemProperties
Utility to set system properties that can later be used by log configuration files.
- 从以下版本开始:
- 2.0.0
- 作者:
- Andy Wilkinson, Phillip Webb, Madhura Bhave, Vedran Pavic, Robert Thornton, Eddú Meléndez, Jonatan Ivanov
- 另请参阅:
-
构造器概要
构造器构造器说明LoggingSystemProperties(Environment environment) Create a newLoggingSystemPropertiesinstance.LoggingSystemProperties(Environment environment, BiConsumer<String, String> setter) Create a newLoggingSystemPropertiesinstance.LoggingSystemProperties(Environment environment, Function<String, String> defaultValueResolver, BiConsumer<String, String> setter) Create a newLoggingSystemPropertiesinstance. -
方法概要
修饰符和类型方法说明final voidapply()final voidprotected voidapply(LogFile logFile, PropertyResolver resolver) protected ConsoleReturns theConsoleto use.protected Charset已过时, 待删除: 此 API 元素将从以后的版本中删除。protected CharsetReturns the default console charset.protected CharsetReturns the default file charset.protected final voidsetSystemProperty(String name, String value) Set a system property.
-
构造器详细资料
-
LoggingSystemProperties
Create a newLoggingSystemPropertiesinstance.- 参数:
environment- the source environment
-
LoggingSystemProperties
Create a newLoggingSystemPropertiesinstance.- 参数:
environment- the source environmentsetter- setter used to apply the property ornullfor system properties- 从以下版本开始:
- 2.4.2
-
LoggingSystemProperties
public LoggingSystemProperties(Environment environment, Function<String, String> defaultValueResolver, BiConsumer<String, String> setter) Create a newLoggingSystemPropertiesinstance.- 参数:
environment- the source environmentdefaultValueResolver- function used to resolve default values ornullsetter- setter used to apply the property ornullfor system properties- 从以下版本开始:
- 3.2.0
-
-
方法详细资料
-
getConsole
Returns theConsoleto use.- 返回:
- the
Consoleto use - 从以下版本开始:
- 3.5.0
-
apply
public final void apply() -
apply
-
apply
-
getDefaultCharset
已过时, 待删除: 此 API 元素将从以后的版本中删除。since 3.5.0 for removal in 4.0.0 in favor ofgetDefaultConsoleCharset()andgetDefaultFileCharset().Returns the default charset.- 返回:
- the default charset
-
getDefaultConsoleCharset
Returns the default console charset.- 返回:
- the default console charset
- 从以下版本开始:
- 3.5.0
-
getDefaultFileCharset
Returns the default file charset.- 返回:
- the default file charset
- 从以下版本开始:
- 3.5.0
-
setSystemProperty
Set a system property.- 参数:
name- the property namevalue- the value
-
getDefaultConsoleCharset()andgetDefaultFileCharset().