[
https://issues.apache.org/jira/browse/LOG4J2-1356?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15233999#comment-15233999
]
Mikael Ståldal commented on LOG4J2-1356:
----------------------------------------
So then I don't need to check for Constants.ENABLE_DIRECT_ENCODERS in
GelfLayout like this?
@Override
public void encode(final LogEvent event, final ByteBufferDestination
destination) {
if (!Constants.ENABLE_DIRECT_ENCODERS || !Constants.ENABLE_THREADLOCALS
|| compressionType != CompressionType.OFF) {
super.encode(event, destination);
return;
}
final StringBuilder text = toText(event, getStringBuilder(), true);
final TextEncoderHelper helper = getCachedTextEncoderHelper();
helper.encodeText(text, destination);
}
> 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: [email protected]
For additional commands, e-mail: [email protected]