logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Addison Walterson (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (LOG4J2-1760) AsyncAppender with LinkedTransferQueue.offer()
Date Wed, 01 Feb 2017 22:13:51 GMT

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

Addison Walterson commented on LOG4J2-1760:

The buffer size of the asynchronous appender can be specified by the user (parameter bufferSize).
The manual states that when using the LinkedTransferQueue the bufferSize cannot be specified
because the LinkedTransferQueue does not support a maximum capacity. I had expected the buffer
to be unlimited but instead it is 0. No message at all will stored in the LinkedTransferQueue
because tryTransfer() is used to enqueue messages. I think it would be a good thing to allow
storing messages in the LinkedTransferQueue because this would mean that the asynchronous
appender is still used when multiple messages are logged at about the same time.

> AsyncAppender with LinkedTransferQueue.offer()
> ----------------------------------------------
>                 Key: LOG4J2-1760
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-1760
>             Project: Log4j 2
>          Issue Type: Improvement
>          Components: Appenders
>    Affects Versions: 2.7
>            Reporter: Addison Walterson
>            Priority: Minor
> I suggest that the AsyncAppender can use a LinkedTransferQueue for which offer() is used
to enqueue messages because tryTransfer() only succeeds if the receiving thread waits for
a message which means that the queue has length 0.

This message was sent by Atlassian JIRA

To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org

View raw message