类 Log4j2Configurator

java.lang.Object
cn.warpin.thirdPart.huawei.obs.obs.services.Log4j2Configurator

public class Log4j2Configurator extends Object
Log configuration class integrated with Log4j2
  • 字段详细资料

    • isWatchStart

      private static volatile boolean isWatchStart
    • log4j2Enabled

      private static volatile boolean log4j2Enabled
    • logger

      private static final Logger logger
  • 构造器详细资料

    • Log4j2Configurator

      public Log4j2Configurator()
  • 方法详细资料

    • setLogConfig

      public static void setLogConfig(String configPath)
      Configure logs.
      参数:
      configPath - Path to the log configuration file
    • setLogConfig

      public static void setLogConfig(String configPath, boolean isWatchConfig)
      Configure logs.
      参数:
      configPath - Path to the log configuration file
      isWatchConfig - Whether to monitor changes of the log configuration file
    • getLogContext

      private static Object getLogContext(String configPath)
    • setLogConfig

      public static void setLogConfig(String configPath, boolean isWatchConfig, long watchInterval)
      Configure logs.
      参数:
      configPath - Path to the log configuration file
      isWatchConfig - Whether to monitor changes of the log configuration file
      watchInterval - Interval for monitoring changes of the log configuration file, in units of ms