Class DiscardingAsyncQueueFullPolicy

    • Constructor Detail

      • DiscardingAsyncQueueFullPolicy

        public DiscardingAsyncQueueFullPolicy​(Level thresholdLevel)
        Constructs a router that will discard events equal or less specific than the specified threshold level when the queue is full.
        Parameters:
        thresholdLevel - level of events to discard
    • Method Detail

      • getRoute

        public EventRoute getRoute​(long backgroundThreadId,
                                   Level level)
        Description copied from interface: AsyncQueueFullPolicy
        Returns the appropriate route for the current log event, given the specified parameters.
        Specified by:
        getRoute in interface AsyncQueueFullPolicy
        Overrides:
        getRoute in class DefaultAsyncQueueFullPolicy
        Parameters:
        backgroundThreadId - the thread ID of the background thread. Can be compared with the current thread's ID.
        level - the level of the log event
        Returns:
        the appropriate route for the current event
      • getThresholdLevel

        public Level getThresholdLevel()