Class LoggingSystem

    • Field Detail

      • THREAD_CONTEXT_DEFAULT_INITIAL_CAPACITY

        public static final int THREAD_CONTEXT_DEFAULT_INITIAL_CAPACITY
        See Also:
        Constant Field Values
    • Constructor Detail

      • LoggingSystem

        public LoggingSystem()
    • Method Detail

      • acquireInitializationLock

        @InternalApi
        public void acquireInitializationLock()
        Acquires a lock on the initialization of locating a logging system provider. This lock should be released once the logging system provider is loaded. This lock is provided to allow for lazy initialization via frameworks like OSGi to wait for a provider to be installed before allowing initialization to continue.
        See Also:
        LOG4J2-373
      • releaseInitializationLock

        @InternalApi
        public void releaseInitializationLock()
        Releases a lock on the initialization phase of this logging system.
      • setLoggerContextFactory

        public void setLoggerContextFactory​(LoggerContextFactory loggerContextFactory)
      • setMessageFactory

        public void setMessageFactory​(MessageFactory messageFactory)
      • setFlowMessageFactory

        public void setFlowMessageFactory​(FlowMessageFactory flowMessageFactory)
      • setThreadContextMapFactory

        public void setThreadContextMapFactory​(Supplier<ThreadContextMap> threadContextMapFactory)
      • setThreadContextStackFactory

        public void setThreadContextStackFactory​(Supplier<ThreadContextStack> threadContextStackFactory)
      • getInstance

        public static LoggingSystem getInstance()
        Gets the LoggingSystem instance.
      • getLoggerContextFactory

        public static LoggerContextFactory getLoggerContextFactory()
        Gets the current LoggerContextFactory. This may initialize the instance if this is the first time it was requested.
      • getMessageFactory

        public static MessageFactory getMessageFactory()
      • createContextMap

        public static ThreadContextMap createContextMap()
        Creates a new ThreadContextMap.
      • createContextStack

        public static ThreadContextStack createContextStack()
        Creates a new ThreadContextStack.