类 LoggingSystemProperties

java.lang.Object
org.springframework.boot.logging.LoggingSystemProperties
直接已知子类:
LogbackLoggingSystemProperties

public class LoggingSystemProperties extends Object
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

      public LoggingSystemProperties(Environment environment)
      Create a new LoggingSystemProperties instance.
      参数:
      environment - the source environment
    • LoggingSystemProperties

      public LoggingSystemProperties(Environment environment, BiConsumer<String,String> setter)
      Create a new LoggingSystemProperties instance.
      参数:
      environment - the source environment
      setter - setter used to apply the property or null for system properties
      从以下版本开始:
      2.4.2
    • LoggingSystemProperties

      public LoggingSystemProperties(Environment environment, Function<String,String> defaultValueResolver, BiConsumer<String,String> setter)
      Create a new LoggingSystemProperties instance.
      参数:
      environment - the source environment
      defaultValueResolver - function used to resolve default values or null
      setter - setter used to apply the property or null for system properties
      从以下版本开始:
      3.2.0
  • 方法详细资料

    • getConsole

      protected Console getConsole()
      Returns the Console to use.
      返回:
      the Console to use
      从以下版本开始:
      3.5.0
    • apply

      public final void apply()
    • apply

      public final void apply(LogFile logFile)
    • apply

      protected void apply(LogFile logFile, PropertyResolver resolver)
    • getDefaultCharset

      @Deprecated(since="3.5.0", forRemoval=true) protected Charset getDefaultCharset()
      已过时, 待删除: 此 API 元素将从以后的版本中删除。
      since 3.5.0 for removal in 4.0.0 in favor of getDefaultConsoleCharset() and getDefaultFileCharset().
      Returns the default charset.
      返回:
      the default charset
    • getDefaultConsoleCharset

      protected Charset getDefaultConsoleCharset()
      Returns the default console charset.
      返回:
      the default console charset
      从以下版本开始:
      3.5.0
    • getDefaultFileCharset

      protected Charset getDefaultFileCharset()
      Returns the default file charset.
      返回:
      the default file charset
      从以下版本开始:
      3.5.0
    • setSystemProperty

      protected final void setSystemProperty(String name, String value)
      Set a system property.
      参数:
      name - the property name
      value - the value