Replies: 5 comments 7 replies
-
|
What is your definition of a structured layout? We already agreed that BSD syslog is not structured: it is a set of loose conventions that every implementation applies slightly differently. But I do not follow why RFC 5424 fails the bar. If the reason is that it imposes length and syntax restrictions (on I have no objection to removing these classes in a major release. What gives me pause is that this reads like a removal in
TL;DR: I would recommend moderation. The real question is not the user count, it is whether the maintenance we are actually spending on these classes justifies breaking the usages that exist, in a minor release. How many problems do you realistically expect to keep finding in them? |
Beta Was this translation helpful? Give feedback.
-
|
Please. Don't. Break. Anything. In 2.x. PLEASE. Sigh. |
Beta Was this translation helpful? Give feedback.
-
|
I would suggest fixing StructuredDataMessage. First, add a StructuredData element that contains the SD-ID and the key/value pairs. Then modify StructuredDataMessage with a constructor that accepts List of StructuredDataElements and a String message. I would deprecate the existing constructors in 2.x and remove them in 3.x. I would then modify StructuredDataMessage accordingliy. Since StructuredDataMessage should extend MapMessage I would suggest that when acting as a MapMessage the maps of the StructuredDataMessages be merged and their keys be prefixed with the SD-ID value followed by ":". The message should be stored in a key with the value "message" in the MapMessage map. I would then modify RFC5424Layout to leverage this structure. Everything else should treat it as a MapMessage. StructuredDataCollectionMessage should be deprecated in 2.x and removed in 3.x. It makes no sense. |
Beta Was this translation helpful? Give feedback.
-
|
I would love to use this API to make structured logging calls for JSON layouts as well. If this type of message were useful for cases where logs may go to either syslog or some other system, I'd like to be able to use more structure in the log message than free form text. This makes parsing logs much easier. |
Beta Was this translation helpful? Give feedback.
-
|
I've been looking closely at our roadmap and how this proposal to clean up legacy RFC 5424 / If we do proceed with removing these legacy pieces, perhaps we can consider it a great stepping stone towards the goals outlined in Issue #1976. Replacing these older, high-maintenance components with native support for W3C Trace Context standards ( I wanted to share this thought to see if coordinating these two topics is a direction we want to explore for Log4j 3.x. If the team agrees this is a good path forward. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I propose removing
because
If you agree and/or disagree with this proposal, please share your thoughts with your reasoning.
1 I've searched a corpus of 706,389 unique Maven coordinates, amounting to 1,288,939 artifacts (the link is only accessible by ASF and Logging Services PMC members!) and 238,544,576 classes in total, and spotted no usages.
Beta Was this translation helpful? Give feedback.
All reactions