You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2021/03/01 15:20:00 UTC

[jira] [Commented] (LOG4J2-3028) OutputStreamManager does not clear buffer on exception

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

ASF subversion and git services commented on LOG4J2-3028:
---------------------------------------------------------

Commit 9ed470fcef1da227d8a24f7bd81de4dd487775ab in logging-log4j2's branch refs/heads/release-2.x from jakubk
[ https://gitbox.apache.org/repos/asf?p=logging-log4j2.git;h=9ed470f ]

LOG4J2-3028: Always clear the OutputStreamManager buffer on flush


> OutputStreamManager does not clear buffer on exception
> ------------------------------------------------------
>
>                 Key: LOG4J2-3028
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-3028
>             Project: Log4j 2
>          Issue Type: Bug
>          Components: Appenders
>            Reporter: Jakub
>            Assignee: Carter Kozak
>            Priority: Trivial
>
> I have noticed that OutputStreamManager#flushBuffer does not clear the buffer if #writeToDestination throws an exception. This does not lead to data corruption, but in case of a #flush call when the buffer isn't full (which can happen at the end of a batch when e.g. using AsyncLogger), it will mean that only partial capacity of the buffer will be available until the next successful flush.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)