[
https://issues.apache.org/jira/browse/LOG4J2-168?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13597247#comment-13597247
]
Scott Severtson commented on LOG4J2-168:
----------------------------------------
I'm finally digging back into this, and I'm a bit confused - not sure that I
fully understand the configuration initialization process, or how to wire
things together.
I've created a MDCFields plugin, with the following factory method:
@PluginFactory
public static ConcurrentMap<String, String> createKeyValuePairsMap(
@PluginElement("MDCFields") final
KeyValuePair[] keyValuePairs)
However, in RFC5424Layout, which of the following do I include in the
.createLayout(...) factory method?
1. @PluginElement("mdcFields") MDCFields mdcFields,
2. @PluginElement("mdcFields") Map<String, String> mdcFields,
Also, the AppendersPlugin returns a ConcurrentMap - is this necessary for the
MDCFields plugin? I didn't think the configuration could be modified except by
a complete reload, so I'm not sure why a ConcurrentMap is needed versus a
plain-old Map.
Thanks!
> 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: [email protected]
For additional commands, e-mail: [email protected]