logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gary Gregory (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (LOG4J2-1873) Implement UTF-8 encoding that doesn't use CharsetEncoder
Date Mon, 10 Apr 2017 15:39:41 GMT

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

Gary Gregory commented on LOG4J2-1873:

ICU4J might have something we can optionally depend on or copy.

> Implement UTF-8 encoding that doesn't use CharsetEncoder
> --------------------------------------------------------
>                 Key: LOG4J2-1873
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-1873
>             Project: Log4j 2
>          Issue Type: Improvement
>            Reporter: Roman Leventov
> CharsetEncoder accepts only CharBuffers, and for the sake of being entirely garbage-free
we don't want to use CharBuffer.wrap(stringBuilder), when encoding an event.
> That forces us to make additional data copy from StringBuilder to a thread-local CharBuffer.
> This could be avoided by implementing UTF-8 encoding logic in log4j-core itself, and
not using CharsetEncoder.
> This issue is specifically about UTF-8 because it is used predominantly and it's relatively
easy to implement. There are also likely some open-source Apache 2-compatible implementations
in Java out there already that we could just copy and adapt.

This message was sent by Atlassian JIRA

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

View raw message