Uploaded image for project: 'Log4j 2'
  1. Log4j 2
  2. LOG4J2-3028

OutputStreamManager does not clear buffer on exception

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Appenders
    • Labels:
      None

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                ckozak Carter Kozak
                Reporter:
                jakubkozlowski Jakub
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: