Class LogManager

  • public class LogManager
    extends Object

    This class is a minimal implementation of the original org.apache.log4j.LogManager class (as found in log4j 1.2) delegating all calls to SLF4J.

    This implementation does NOT implement the setRepositorySelector(), getLoggerRepository(), exists(), getCurrentLoggers(), shutdown() and resetConfiguration() methods which do not have SLF4J equivalents.

    • Constructor Detail

      • LogManager

        public LogManager()
    • Method Detail

      • getRootLogger

        public static Logger getRootLogger()
      • getLogger

        public static Logger getLogger​(String name)
      • getLogger

        public static Logger getLogger​(Class clazz)
      • getLogger

        public static Logger getLogger​(String name,
                                       LoggerFactory loggerFactory)
        Returns a logger instance created by loggerFactory. This method was requested in SLF4J-225. Note that log4j-over-slf4j does not ship with a LoggerFactory implementation. If this method is called, the caller must provide his/her own implementation.
        name - the name of the desired logger
        loggerFactory - an instance of LoggerFactory
        returns a logger instance created by loggerFactory
      • getCurrentLoggers

        public static Enumeration getCurrentLoggers()
        This bogus implementation returns an empty enumeration.
      • shutdown

        public static void shutdown()
        Implemented as NOP.
      • resetConfiguration

        public static void resetConfiguration()
        Implemented as NOP.