lunarbae628 opened a new pull request, #4472:
URL: https://github.com/apache/logging-log4j2/pull/4472

   Ports #4471 from `2.x`.
   
   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 `escapeNL` 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 (49 
cases).
   - `./mvnw clean verify` — passed.
   
   ## Checklist
   
   - [x] Changes are based on `main`.
   - [x] Local verification completed as described above.
   - [x] Changelog entry added under `src/changelog/.3.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]

Reply via email to