You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by "Sunny Chan (JIRA)" <ji...@apache.org> on 2017/11/03 07:20:00 UTC
[jira] [Created] (LOG4J2-2097) LogEventPatternConverter JSON
implementation should replace newline with \n
Sunny Chan created LOG4J2-2097:
----------------------------------
Summary: LogEventPatternConverter JSON implementation should replace newline with \n
Key: LOG4J2-2097
URL: https://issues.apache.org/jira/browse/LOG4J2-2097
Project: Log4j 2
Issue Type: Bug
Components: Layouts
Affects Versions: 2.9.1
Reporter: Sunny Chan
If you use %enc{%msg}{JSON} and do:
log.info("Line 1\nLine 2")
The message will encode as
"Line 1\u000ALine 2"
It would be nice if the JSON encoder would replace newline with \n, and if the code can recongize other special character would be even better
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)