lunarbae628 opened a new pull request, #4471: URL: https://github.com/apache/logging-log4j2/pull/4471
Fixes #4464. `Rfc5424Layout` now replaces newlines before escaping `"`, `\` and `]` in structured data parameter values. Previously, those characters were left unescaped when introduced by the newline replacement. With `newLineEscape` set to the literal string `\n`, a value `A<CR><LF>B` is now written as `k="A\\nB"` instead of `k="A\nB"`. Tests cover CRLF/LF and replacement strings containing these characters in both MDC and `StructuredDataMessage` values. Free-form MSG output is unchanged. The changelog notes the output difference for receivers that do not decode RFC 5424 escapes. Validation: - `./mvnw test -pl :log4j-core-test -Dtest=Rfc5424LayoutTest` — passed (71 cases). - Full reactor verification passed across `./mvnw verify` and a resumed `./mvnw verify -rf :log4j-core-test` run. ## Checklist - [x] Changes are based on `2.x`. - [x] Local verification completed as described above. - [x] Changelog entry added under `src/changelog/.2.x.x`. - [x] Tests provided. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
