[ 
https://issues.apache.org/jira/browse/LOG4J2-1453?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15357791#comment-15357791
 ] 

Gary Gregory commented on LOG4J2-1453:
--------------------------------------

What about adding a Timeout class that holds both the long and the TimeUnit, so 
we can use one param instead of 2 in all APIs?

> 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}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