Class Loggers


public class Loggers extends Object
A set of utilities around Logging.
  • Field Details

    • SPACE

      public static final String SPACE
      See Also:

      public static final Setting<org.apache.logging.log4j.Level> LOG_DEFAULT_LEVEL_SETTING

      public static final Setting.AffixSetting<org.apache.logging.log4j.Level> LOG_LEVEL_SETTING
  • Constructor Details

    • Loggers

      public Loggers()
  • Method Details

    • getLogger

      public static org.apache.logging.log4j.Logger getLogger(Class<?> clazz, ShardId shardId, String... prefixes)
    • getLogger

      public static org.apache.logging.log4j.Logger getLogger(String loggerName, ShardId shardId)
      Just like getLogger(Class, ShardId, String...) but String loggerName instead of Class and no extra prefixes.
    • getLogger

      public static org.apache.logging.log4j.Logger getLogger(Class<?> clazz, Index index, String... prefixes)
    • getLogger

      public static org.apache.logging.log4j.Logger getLogger(Class<?> clazz, String... prefixes)
    • getLogger

      public static org.apache.logging.log4j.Logger getLogger(org.apache.logging.log4j.Logger parentLogger, String s)
    • setLevel

      public static void setLevel(org.apache.logging.log4j.Logger logger, String level)
      Set the level of the logger. If the new level is null, the logger will inherit it's level from its nearest ancestor with a non-null level.
    • setLevel

      public static void setLevel(org.apache.logging.log4j.Logger logger, org.apache.logging.log4j.Level level)
    • addAppender

      public static void addAppender(org.apache.logging.log4j.Logger logger, org.apache.logging.log4j.core.Appender appender)
    • removeAppender

      public static void removeAppender(org.apache.logging.log4j.Logger logger, org.apache.logging.log4j.core.Appender appender)
    • findAppender

      public static org.apache.logging.log4j.core.Appender findAppender(org.apache.logging.log4j.Logger logger, Class<? extends org.apache.logging.log4j.core.Appender> clazz)