logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Remko Popma (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (LOG4J2-1343) Update ConsoleAppender to utilize gc-free Layout method
Date Tue, 12 Apr 2016 16:44:25 GMT

     [ 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: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org


Mime
View raw message