[ 
https://issues.apache.org/jira/browse/LOG4J2-1453?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

David Leonhartsberger updated LOG4J2-1453:
------------------------------------------
    Description: 
The current implementation of {code}AsyncLoggerDisruptor#stop(){code} could 
block for a long time waiting for the Disruptor queue to be processed.

I suggest to use a configurable timeout (similar to AsyncAppender) and call the 
{code}Disruptor#shutdown(final long timeout, final TimeUnit timeUnit){code} of 
the Disruptor instead. 
If there are still unconsumed log entries left in the Disruptor after the 
timeout, I would just log the count of discarded entries as its done in 
AsyncAppender.stop.

  was:
The current implementation of {code}AsyncLoggerDisruptor#stop(){code} could 
block for a long time waiting for the Disruptor queue to be processed.

I suggest to use a configurable timeout (similar to AsyncAppender) and call the 
{code}shutdown(final long timeout, final TimeUnit timeUnit){code} of the 
Disruptor instead. 
If there are still unconsumed log entries left in the Disruptor after the 
timeout, I would just log the count of discarded entries as its done in 
AsyncAppender.stop.


> Configurable shutdown timeout for AsyncLogger
> ---------------------------------------------
>
>                 Key: LOG4J2-1453
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-1453
>             Project: Log4j 2
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 2.6.1
>            Reporter: David Leonhartsberger
>            Priority: Minor
>   Original Estimate: 28h
>  Remaining Estimate: 28h
>
> The current implementation of {code}AsyncLoggerDisruptor#stop(){code} could 
> block for a long time waiting for the Disruptor queue to be processed.
> I suggest to use a configurable timeout (similar to AsyncAppender) and call 
> the {code}Disruptor#shutdown(final long timeout, final TimeUnit 
> timeUnit){code} of the Disruptor instead. 
> If there are still unconsumed log entries left in the Disruptor after the 
> timeout, I would just log the count of discarded entries as its done in 
> AsyncAppender.stop.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to