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

Remko Popma commented on LOG4J2-1453:
-------------------------------------

A long to represent timeout duration in millis is fine (and would be consistent 
with the way [AsyncAppender 
timeout|https://logging.apache.org/log4j/2.x/manual/appenders.html#AsyncAppender]
 is configured).


> 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} method instead of the one which takes no paramter and 
> therefore waits indefinitely. 
> 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