Class Log4jv2LoggerContext

  • All Implemented Interfaces:
    org.apache.logging.log4j.spi.LoggerContext

    public class Log4jv2LoggerContext
    extends Object
    implements org.apache.logging.log4j.spi.LoggerContext
    This is the class used to obtain the loggers. Returned loggers have Log4J2 interface (ExtendedLogger), but delegate the work to underlying PaxLogger.
    • Constructor Detail

      • Log4jv2LoggerContext

        public Log4jv2LoggerContext()
    • Method Detail

      • setPaxLoggingManager

        public static void setPaxLoggingManager​(PaxLoggingManager manager)
      • getLogger

        public org.apache.logging.log4j.spi.ExtendedLogger getLogger​(String name)
        Specified by:
        getLogger in interface org.apache.logging.log4j.spi.LoggerContext
      • getLogger

        public org.apache.logging.log4j.spi.ExtendedLogger getLogger​(String name,
                                                                     org.apache.logging.log4j.message.MessageFactory messageFactory)
        Specified by:
        getLogger in interface org.apache.logging.log4j.spi.LoggerContext
      • hasLogger

        public boolean hasLogger​(String name)
        Specified by:
        hasLogger in interface org.apache.logging.log4j.spi.LoggerContext
      • hasLogger

        public boolean hasLogger​(String name,
                                 org.apache.logging.log4j.message.MessageFactory messageFactory)
        Specified by:
        hasLogger in interface org.apache.logging.log4j.spi.LoggerContext
      • hasLogger

        public boolean hasLogger​(String name,
                                 Class<? extends org.apache.logging.log4j.message.MessageFactory> messageFactoryClass)
        Specified by:
        hasLogger in interface org.apache.logging.log4j.spi.LoggerContext
      • getExternalContext

        public Object getExternalContext()
        Specified by:
        getExternalContext in interface org.apache.logging.log4j.spi.LoggerContext