Class Loggers


  • public class Loggers
    extends java.lang.Object
    A set of utilities around Logging.
    • Constructor Summary

      Constructors 
      Constructor Description
      Loggers()  
    • Method Summary

      Modifier and Type Method Description
      static void addAppender​(org.apache.logging.log4j.Logger logger, org.apache.logging.log4j.core.Appender appender)  
      static org.apache.logging.log4j.core.Appender findAppender​(org.apache.logging.log4j.Logger logger, java.lang.Class<? extends org.apache.logging.log4j.core.Appender> clazz)  
      static org.apache.logging.log4j.Logger getLogger​(java.lang.Class<?> clazz, java.lang.String... prefixes)  
      static org.apache.logging.log4j.Logger getLogger​(java.lang.Class<?> clazz, Index index, java.lang.String... prefixes)  
      static org.apache.logging.log4j.Logger getLogger​(java.lang.Class<?> clazz, ShardId shardId, java.lang.String... prefixes)  
      static org.apache.logging.log4j.Logger getLogger​(java.lang.String loggerName, ShardId shardId)
      Just like getLogger(Class, ShardId, String...) but String loggerName instead of Class and no extra prefixes.
      static org.apache.logging.log4j.Logger getLogger​(org.apache.logging.log4j.Logger parentLogger, java.lang.String s)  
      static void removeAppender​(org.apache.logging.log4j.Logger logger, org.apache.logging.log4j.core.Appender appender)  
      static void setLevel​(org.apache.logging.log4j.Logger logger, java.lang.String level)
      Set the level of the logger.
      static void setLevel​(org.apache.logging.log4j.Logger logger, org.apache.logging.log4j.Level level)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • LOG_DEFAULT_LEVEL_SETTING

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

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

      • Loggers

        public Loggers()
    • Method Detail

      • getLogger

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

        public static org.apache.logging.log4j.Logger getLogger​(java.lang.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​(java.lang.Class<?> clazz,
                                                                Index index,
                                                                java.lang.String... prefixes)
      • getLogger

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

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

        public static void setLevel​(org.apache.logging.log4j.Logger logger,
                                    java.lang.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,
                                                                          java.lang.Class<? extends org.apache.logging.log4j.core.Appender> clazz)