You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by "Remko Popma (JIRA)" <ji...@apache.org> on 2015/09/07 13:40:45 UTC

[jira] [Commented] (LOG4J2-1088) Add Comma Separated Value (CSV) layouts for parameter and event logging.

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

Remko Popma commented on LOG4J2-1088:
-------------------------------------

Async Loggers and Async Appenders will call Message::getFormattedMessage before passing the LogEvent to the background thread.

The purpose of this is to take a snapshot of the message and parameters in the log event to ensure the background thread sees the current values (at the time the application called logger::log). See LOG4J2-763.

This is not mandatory: some Message implementations (like MapMessage) deliberately do not follow this pattern and let the application make modifications to the map. This is documented in the MapMessage class documentation.

ObjectArrayMessage currently holds a reference to the array object passed to the constructor, allowing the application to make changes. If this is on purpose it may be good to document it. An alternative is to clone the parameter array in the constructor or in the {{getFormattedMessage}} method.


> Add Comma Separated Value (CSV) layouts for parameter and event logging.
> ------------------------------------------------------------------------
>
>                 Key: LOG4J2-1088
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-1088
>             Project: Log4j 2
>          Issue Type: New Feature
>            Reporter: Gary Gregory
>            Assignee: Gary Gregory
>         Attachments: log4j-csv-2015-09-02.diff
>
>
> Add a Comma Separated Value (CSV) layout.



--
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