[
https://issues.apache.org/jira/browse/LOG4J2-1385?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15316092#comment-15316092
]
Remko Popma commented on LOG4J2-1385:
-------------------------------------
I would subclass {{org.apache.commons.csv.CSVFormat}} and override the
{{print(Object, Appendable, boolean) method.
* if Appendable is not a StringBuilder or the Object is not
StringBuilderFormattable just delegate to super
* otherwise cast down and use the richer interfaces of the subtypes to avoid
allocation
> (GC) CSV layouts should not create a new CSVPrinter for each log event
> ----------------------------------------------------------------------
>
> Key: LOG4J2-1385
> URL: https://issues.apache.org/jira/browse/LOG4J2-1385
> Project: Log4j 2
> Issue Type: Improvement
> Components: Layouts
> Affects Versions: 2.5
> Reporter: Gary Gregory
> Assignee: Gary Gregory
> Fix For: 2.6.1
>
> Attachments: logging-log4j2.patch
>
>
> CSV layouts should not create a new CSVPrinter for each log event. This will
> likely require a new version of Apache Commons CVS, see [CSV-182].
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]