[
https://issues.apache.org/jira/browse/LOG4J2-1453?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15357799#comment-15357799
]
David Leonhartsberger commented on LOG4J2-1453:
-----------------------------------------------
In AsyncAppender its just a "long". Its used for Thread.join(millis).
The shutdown method I mentioned is the public API of the Disruptor.
For the configuration class in log4j I would use java.time.Duration if this is
possible (java 8 required) otherwise I would just use a long value that
represents duration in millis.
> 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]