[ 
https://issues.apache.org/jira/browse/LOG4J2-1343?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Remko Popma resolved LOG4J2-1343.
---------------------------------
    Resolution: Fixed

Fixed in master.

I believe I now have a correct and clean solution. As stated in my previous 
comment, OutputStreamManager (and subclasses) now extend from 
ByteBufferDestination, so they can participate in the {{Layout.encode(LogEvent, 
ByteBufferDestination)}} garbage-free layout API.

Each manager now has a ByteBuffer (whether bufferedIO is true or not). This 
makes all manager implementations consistent and easy to reason about. I 
created some protected methods like {{flushBuffer}}, {{flushDestination}} and 
{{writeToDestination}} to facilitate code reuse in the manager subclasses.

TextEncoderHelper now locks on the ByteBufferDestination (i.e. the manager) 
when writing into the ByteBuffer, so that log events won't be intertwined.

SocketAppender is still excluded from using the garbage-free layout mechanism: 
this needs more analysis to see what is needed.

> Update ConsoleAppender to utilize gc-free Layout method
> -------------------------------------------------------
>
>                 Key: LOG4J2-1343
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-1343
>             Project: Log4j 2
>          Issue Type: Improvement
>          Components: Appenders
>    Affects Versions: 2.5
>            Reporter: Remko Popma
>            Assignee: Remko Popma
>             Fix For: 2.6
>
>
> TBD: would we want to include this in the upcoming 2.6 release?



--
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