[jira] [Commented] (LOG4J2-168) Include arbitrary message fields in RFC-5424 structured data
[ https://issues.apache.org/jira/browse/LOG4J2-168?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13742328#comment-13742328 ] Tibor Benke commented on LOG4J2-168: I created a new issue: https://issues.apache.org/jira/browse/LOG4J2-355 And I also uploaded the patch. 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 Fix For: 2.0-beta8 Attachments: include-arbitrary-fields-in-mdc-2.patch, 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
[jira] [Commented] (LOG4J2-168) Include arbitrary message fields in RFC-5424 structured data
[ https://issues.apache.org/jira/browse/LOG4J2-168?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13740953#comment-13740953 ] Tibor Benke commented on LOG4J2-168: Does the log4j2 support multiple SD-ELEMENTs in an RFC 5424 message? For example: 1351 2013-08-15T11:47:44+02:00 10.30.255.247 APP-NAME PID MSGID [stuff@32473 foo=Foo bar=Bar][otherStuff@32473 baz=Baz qux=Qux] Some message I think it'd be nice to write something like this: LoggerFields enterpriseId=32473 name=stuff KeyValuePair key=foo value=Foo/ KeyValuePair key=Bar value = Bar/ /LoggerFields LoggerFields enterpriseId=32473 name=otherStuff KeyValuePair key=baz value=Baz/ KeyValuePair key=qux value=Qux/ /LoggerFields Then we could structure more the log messages. What are your opinions? 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 Fix For: 2.0-beta8 Attachments: include-arbitrary-fields-in-mdc-2.patch, 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
[jira] [Commented] (LOG4J2-168) Include arbitrary message fields in RFC-5424 structured data
[ https://issues.apache.org/jira/browse/LOG4J2-168?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13740957#comment-13740957 ] Scott Severtson commented on LOG4J2-168: It currently does not support multiple SD-ELEMENTS, and it's not really a feature my team needs. But, I wouldn't see any harm in someone adding support for this - patches are always welcome! 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 Fix For: 2.0-beta8 Attachments: include-arbitrary-fields-in-mdc-2.patch, 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
[jira] [Commented] (LOG4J2-168) Include arbitrary message fields in RFC-5424 structured data
[ https://issues.apache.org/jira/browse/LOG4J2-168?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13740983#comment-13740983 ] Tibor Benke commented on LOG4J2-168: I think we should only modify the LoggerFields, RFC5424Layout and SyslogAppender classes (and the TLSRFC5424Layout and TLSSyslogAppender classes after their merge). I'm not sure about one thing: Can we use arrays with @PluginElement? Like this: @PluginElement(LoggerFields) final LoggerFields[] loggerFields And I also suggest that if no name specified in the LoggerFields, we should add its key-value pairs to the default mdc SD-ELEMENT. If nobody has quarrel with it, I'll implement it. 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 Fix For: 2.0-beta8 Attachments: include-arbitrary-fields-in-mdc-2.patch, 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
[jira] [Commented] (LOG4J2-168) Include arbitrary message fields in RFC-5424 structured data
[ https://issues.apache.org/jira/browse/LOG4J2-168?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13741024#comment-13741024 ] Gary Gregory commented on LOG4J2-168: - {quote} Can we use arrays with @PluginElement? {quote} Yes, for example please see: {{org.apache.logging.log4j.core.appender.AsyncAppender.createAppender(AppenderRef[], String, String, String, String, String, Filter, Configuration, String)}} 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 Fix For: 2.0-beta8 Attachments: include-arbitrary-fields-in-mdc-2.patch, 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
[jira] [Commented] (LOG4J2-168) Include arbitrary message fields in RFC-5424 structured data
[ https://issues.apache.org/jira/browse/LOG4J2-168?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13677461#comment-13677461 ] Scott Severtson commented on LOG4J2-168: Finally had time to get back to this issue. Patch with LoggerFields implementation, documentation and tests to follow. 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
[jira] [Commented] (LOG4J2-168) Include arbitrary message fields in RFC-5424 structured data
[ https://issues.apache.org/jira/browse/LOG4J2-168?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13618977#comment-13618977 ] Ralph Goers commented on LOG4J2-168: If you can provide what you have I would be happy to help with this. 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
[jira] [Commented] (LOG4J2-168) Include arbitrary message fields in RFC-5424 structured data
[ https://issues.apache.org/jira/browse/LOG4J2-168?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13613553#comment-13613553 ] Ralph Goers commented on LOG4J2-168: I suspect that it can't match the Map with the LoggerFields object. Try having createAppender accept a LoggerFields object instead of a Map. Then have LoggerFields create an instance of itself with a map as an attribute. In createAppender call loggerFields.getMap() to obtain the data map. 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
[jira] [Commented] (LOG4J2-168) Include arbitrary message fields in RFC-5424 structured data
[ https://issues.apache.org/jira/browse/LOG4J2-168?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13602407#comment-13602407 ] Scott Severtson commented on LOG4J2-168: OK, I'm still just not getting the wiring for this case. I've switched from MDCFields to LoggerFields, as this really doesn't have anything to do with MDC. However, I'd appreciate suggestions if there's a better name. Here's snippits of what I have: LoggerFields.java: --- @Plugin(name = LoggerFields, type = Core) public final class LoggerFields { ... public static MapString, String createKeyValuePairsMap( @PluginElement(LoggerFields) final KeyValuePair[] keyValuePairs) { --- SyslogAppender.java --- @PluginFactory public static SyslogAppender createAppender( ... @PluginElement(loggerFields) MapString, String loggerFields) { --- log4j2.xml: --- Syslog name=syslog format=RFC5424 ... LoggerFields KeyValuePair key=Logger value=%logger/ /LoggerFields /Syslog --- Console output: --- ERROR appender Syslog has no parameter that matches element LoggerFields --- What am I missing? Sorry for all the back-and-forth, but I'm not sure what's going on. I've also tried loggerFields (versus LoggerFields) in the config, but it still complained about the mismatched element name. 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
[jira] [Commented] (LOG4J2-168) Include arbitrary message fields in RFC-5424 structured data
[ https://issues.apache.org/jira/browse/LOG4J2-168?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13597681#comment-13597681 ] Ralph Goers commented on LOG4J2-168: If MDCFields plugin factory method is returning a MapString, String then that is what you would declare on the @PluginElement. Returning a ConcurrentMap should not be necessary for this as the Map won't ever be modified. (The appenders map can be, although it isn't encouraged). 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
[jira] [Commented] (LOG4J2-168) Include arbitrary message fields in RFC-5424 structured data
[ https://issues.apache.org/jira/browse/LOG4J2-168?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13588475#comment-13588475 ] Scott Severtson commented on LOG4J2-168: Two questions: 1. Where do the docs live? More than happy to contribute. 2. Would the following example key/value format be acceptable: ClassName %class Sequence %sequenceNumber? I would have loved to use delimiters for clarity, but PatternParser lumps anything that's not a converter pattern into a single literal, and I had concerns about pre-parsing/splitting the PatternParser string without duplicating a lot of code. I've added a simple test case locally, and reworked the code to support the key/value format described above. Let me know if this is acceptable, and I'll re-generate the patch. 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
[jira] [Commented] (LOG4J2-168) Include arbitrary message fields in RFC-5424 structured data
[ https://issues.apache.org/jira/browse/LOG4J2-168?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13588536#comment-13588536 ] Ralph Goers commented on LOG4J2-168: The docs are in the source - trunk/src/site/xdocs. The user's guide is under the manual subdirectory. They generally use the xdoc format although some files are also processed by velocity first. I was thinking they would be specified similar to MDCFields KeyValuePair key=ClassName value=%class/ KeyValuePair key=Sequence value=%sequenceNumber/ KeyValuePair key=HostName value=$${env:HOSTNAME}/ /MDCFields 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
[jira] [Commented] (LOG4J2-168) Include arbitrary message fields in RFC-5424 structured data
[ https://issues.apache.org/jira/browse/LOG4J2-168?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13588543#comment-13588543 ] Scott Severtson commented on LOG4J2-168: Oh, I didn't think of this style of configuration. Any pointers to a plugin which handles for nested XML configuration like this? 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
[jira] [Commented] (LOG4J2-168) Include arbitrary message fields in RFC-5424 structured data
[ https://issues.apache.org/jira/browse/LOG4J2-168?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13588549#comment-13588549 ] Ralph Goers commented on LOG4J2-168: 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
[jira] [Commented] (LOG4J2-168) Include arbitrary message fields in RFC-5424 structured data
[ https://issues.apache.org/jira/browse/LOG4J2-168?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13585321#comment-13585321 ] Ralph Goers commented on LOG4J2-168: While I support the concept of what this patch is trying to do I have some issues with the actual patch: 1. There aren't any tests for it. 2. There isn't any doc for it. 3. The way the patch works is to use the converter name as the key in the map. This doesn't work well in a lot of cases. For example, specifying %X{key1} %X{key2} would not be nice (and, of course, would also be stupid to specify). I'm wondering if it wouldn't be nicer to specify KeyValuePairs under an MDC or ThreadContext element instead. Then the user could specify the name of the key and the value would be a pattern or expression. 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