Re: [D] Removing `StructuredDataMessage` and all other R FC 5424 et al. [logging-log4j2]
rgoers (via GitHub) <[email protected]> Wed, 03 Jun 2026 14:11:56 -0000
| Newsgroups | gmane.comp.jakarta.log4j.devel |
|---|---|
| Message-ID | <ghd-D_kwDOAKJSSM4Am20J-d5063f72-a163-439c-b478-402f595d72e5__9467.48698349751$1780495971$gmane$org@gitbox.apache.org> |
GitHub user rgoers edited a comment on the discussion: Removing `StructuredDataMessage` and all other RFC 5424 et al. 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. GitHub link: https://github.com/apache/logging-log4j2/discussions/4140#discussioncomment-17166743 ---- This is an automatically sent email for [email protected]. To unsubscribe, please send an email to: [email protected]