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

Ralph Goers edited comment on LOG4J2-168 at 2/27/13 6:04 PM:
-------------------------------------------------------------

Yes and no.  DynamicThresholdFilter, MapFilter, StructuredDataFilter, 
ThreadContextMapFilter and MapRewritePolicy all can be configured with 
KeyValuePairs but not under a subordinate XML element. To do the above you 
would have to create a new MDCFields plugin to contain the KeyValuePairs and 
then have the layout get them from that container object.  Normally they are 
just accepted as an array of key value pairs but I think it would look odd in 
the configuration to have a list of KeyValuePair elements under the layout 
without the container.

You can look at the Appenders plugin to see an example of a Plugin that is 
nothing but a container of an array. It returns a Map to its parent.
                
      was (Author: ralph.go...@dslextreme.com):
    Yes and no.  DynamicThresholdFilter, MapFilter, StructuredDataFilter, 
ThreadContextMapFilter and MapRewritePolicy all can be configured with 
KeyValuePairs but not under a subordinate XML element. To do the above you 
would have to create a new MDCFields plugin to contain the KeyValuePairs and 
then have the layout get them from that container object.  Normally they are 
just accepted as an array of key value pairs but I think it would look odd in 
the configuration to have a list of KeyValuePair elements under the layout 
without the container.
                  
> Include arbitrary message fields in RFC-5424 structured data
> ------------------------------------------------------------
>
>                 Key: LOG4J2-168
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-168
>             Project: Log4j 2
>          Issue Type: Bug
>          Components: Layouts
>    Affects Versions: 2.0-beta5
>         Environment: N/A
>            Reporter: Scott Severtson
>            Priority: Minor
>         Attachments: include-arbitrary-fields-in-mdc.patch
>
>
> We'd really like to see the logger and/or location be included in RFC-5424 
> structured data. As such, we've developed a small patch to allow arbitrary 
> PatternLayout names to be configured on the SyslogAppender, which are then 
> included in the structured data.
> Patch to follow shortly.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

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