Class Log4jv2LoggerContextFactory

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

    public class Log4jv2LoggerContextFactory
    extends Object
    implements org.apache.logging.log4j.spi.LoggerContextFactory
    This is the main class that's briding Log4J2 API into Pax Logging. It's responsibility is to produce LoggerContext objects. See http://logging.apache.org/log4j/2.x/manual/architecture.html Even if there are scenarios where multiple contexts may be used, this factory holds single, static Pax Logging-specific LoggerContext
    • Constructor Detail

      • Log4jv2LoggerContextFactory

        public Log4jv2LoggerContextFactory()
    • Method Detail

      • getContext

        public org.apache.logging.log4j.spi.LoggerContext getContext​(String fqcn,
                                                                     ClassLoader loader,
                                                                     Object externalContext,
                                                                     boolean currentContext)
        Specified by:
        getContext in interface org.apache.logging.log4j.spi.LoggerContextFactory
      • getContext

        public org.apache.logging.log4j.spi.LoggerContext getContext​(String fqcn,
                                                                     ClassLoader loader,
                                                                     Object externalContext,
                                                                     boolean currentContext,
                                                                     URI configLocation,
                                                                     String name)
        Specified by:
        getContext in interface org.apache.logging.log4j.spi.LoggerContextFactory
      • removeContext

        public void removeContext​(org.apache.logging.log4j.spi.LoggerContext removeContext)
        Specified by:
        removeContext in interface org.apache.logging.log4j.spi.LoggerContextFactory