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

Mikael Ståldal edited comment on LOG4J2-1356 at 4/10/16 9:43 AM:
-----------------------------------------------------------------

Yes:

{code}
    @Override
    public void encode(final LogEvent event, final ByteBufferDestination 
destination) {
        if (!Constants.ENABLE_THREADLOCALS || !(eventSerializer instanceof 
Serializer2)) {
            super.encode(event, destination);
            return;
        }
        final StringBuilder text = toText((Serializer2) eventSerializer, event, 
getStringBuilder());
        final TextEncoderHelper helper = getCachedTextEncoderHelper();
        helper.encodeText(text, destination);
    }
{code}


was (Author: mikaelstaldal):
Yes:

{code|PatternLayout.java}
    @Override
    public void encode(final LogEvent event, final ByteBufferDestination 
destination) {
        if (!Constants.ENABLE_THREADLOCALS || !(eventSerializer instanceof 
Serializer2)) {
            super.encode(event, destination);
            return;
        }
        final StringBuilder text = toText((Serializer2) eventSerializer, event, 
getStringBuilder());
        final TextEncoderHelper helper = getCachedTextEncoderHelper();
        helper.encodeText(text, destination);
    }
{code}

> Update GelfLayout to utilize gc-free mechanism for LogEvent processing 
> -----------------------------------------------------------------------
>
>                 Key: LOG4J2-1356
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-1356
>             Project: Log4j 2
>          Issue Type: Improvement
>          Components: Layouts
>    Affects Versions: 2.5
>            Reporter: Mikael Ståldal
>            Assignee: Mikael Ståldal
>              Labels: gc, performance
>
> GelfLayout should support gc-free logging when used with compressionType=OFF.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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

Reply via email to