Package org.apache.logging.log4j.core.async
Provides Asynchronous Logger classes and interfaces for low-latency logging.
-
Interface Summary Interface Description AsyncLoggerConfigDelegate Encapsulates the mechanism used to log asynchronously.AsyncQueueFullPolicy Policy for deciding whether to discard the event, enqueue it or log the event on the current thread when the queue is full.AsyncWaitStrategyFactory This interface allows users to configure a custom Disruptor WaitStrategy used for Async Loggers and Async LoggerConfigs.BlockingQueueFactory<E> Factory for creating instances ofBlockingQueue
.JCToolsBlockingQueueFactory.Idle -
Class Summary Class Description AbstractAsyncExceptionHandler<T> Default disruptor exception handler for errors that occur in the AsyncLogger background thread.ArrayBlockingQueueFactory<E> Factory for creating instances ofArrayBlockingQueue
.AsyncLogger AsyncLogger is a logger designed for high throughput and low latency logging.AsyncLoggerConfig Asynchronous Logger object that is created via configuration and can be combined with synchronous loggers.AsyncLoggerConfig.Builder<B extends AsyncLoggerConfig.Builder<B>> AsyncLoggerConfig.RootLogger An asynchronous root Logger.AsyncLoggerConfig.RootLogger.Builder<B extends AsyncLoggerConfig.RootLogger.Builder<B>> AsyncLoggerConfigDefaultExceptionHandler Default disruptor exception handler for errors that occur in the AsyncLogger background thread.AsyncLoggerConfigDisruptor Helper class decoupling theAsyncLoggerConfig
class from the LMAX Disruptor library.AsyncLoggerConfigDisruptor.Log4jEventWrapper RingBuffer events contain all information necessary to perform the work in a separate thread.AsyncLoggerConfigDisruptor.Log4jEventWrapperHandler EventHandler performs the work in a separate thread.AsyncLoggerContext LoggerContext
that createsAsyncLogger
objects.AsyncLoggerContextSelector ContextSelector
that managesAsyncLoggerContext
instances.AsyncLoggerDefaultExceptionHandler Default disruptor exception handler for errors that occur in the AsyncLogger background thread.AsyncLoggerDisruptor Helper class for async loggers: AsyncLoggerDisruptor handles the mechanics of working with the LMAX Disruptor, and works with its associated AsyncLoggerContext to synchronize the life cycle of the Disruptor and its thread with the life cycle of the context.AsyncQueueFullMessageUtil Consider this class private.AsyncQueueFullPolicyFactory CreatesAsyncQueueFullPolicy
instances based on user-specified system properties.AsyncWaitStrategyFactoryConfig This class allows users to configure the factory used to create an instance of the LMAX disruptor WaitStrategy used by Async Loggers in the log4j configuration.AsyncWaitStrategyFactoryConfig.Builder<B extends AsyncWaitStrategyFactoryConfig.Builder<B>> Builds AsyncWaitStrategyFactoryConfig instances.BasicAsyncLoggerContextSelector Returns either this Thread's context or the defaultAsyncLoggerContext
.DefaultAsyncQueueFullPolicy Default router: enqueue the event for asynchronous logging in the background thread, unless the current thread is the background thread and the queue is full (enqueueing would cause a deadlock).DefaultAsyncWaitStrategyFactory DiscardingAsyncQueueFullPolicy Discarding router extends the DefaultAsyncQueueFullPolicy by first verifying if the queue is fuller than the specified threshold ratio; if this is the case, log events more specific than the specified threshold level are dropped.DisruptorUtil Utility methods for getting Disruptor related configuration.InternalAsyncUtil Helper class providing some async logging-related functionality.JCToolsBlockingQueueFactory<E> Factory for creating instances of BlockingQueues backed by JCToolsMpscArrayQueue
.JCToolsBlockingQueueFactory.MpscBlockingQueue<E> BlockingQueue wrapper for JCTools multiple producer single consumer array queue.LinkedTransferQueueFactory<E> Factory for creating instances ofLinkedTransferQueue
.RingBufferLogEvent When the Disruptor is started, the RingBuffer is populated with event objects.RingBufferLogEvent.Factory Creates the events that will be put in the RingBuffer.RingBufferLogEventHandler This event handler gets passed messages from the RingBuffer as they become available.RingBufferLogEventTranslator This class is responsible for writing elements that make up a log event into the ringbufferRingBufferLogEvent
.TimeoutBlockingWaitStrategy Blocking strategy that uses a lock and condition variable forEventProcessor
s waiting on a barrier. -
Enum Summary Enum Description EventRoute Enumeration over the different destinations where a log event can be sent.JCToolsBlockingQueueFactory.WaitStrategy ThreadNameCachingStrategy Strategy for deciding whether thread name should be cached or not.