[
https://issues.apache.org/jira/browse/LOG4J2-1364?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Delphin updated LOG4J2-1364:
----------------------------
Affects Version/s: 2.5
> PatternLayout can't put newline in substitution
> -----------------------------------------------
>
> Key: LOG4J2-1364
> URL: https://issues.apache.org/jira/browse/LOG4J2-1364
> Project: Log4j 2
> Issue Type: Bug
> Affects Versions: 2.5
> Reporter: Delphin
>
> I try this configuration:
> {noformat}
> <PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} -
> %replace{%m}{\n}{\n\t}%n"/>
> {noformat}
> And log message like this:
> {noformat}
> LOG.error("This\n" +
> "is\n" +
> "multiline\n" +
> "log\n" +
> "message");
> {noformat}
> Result:
> {noformat}
> 15:42:11.364 [main] ERROR com.company.test.Main -
> Thisntisntmultilinentlogntmessage
> {noformat}
> Is there a possibility to get this result:
> {noformat}
> 15:42:11.364 [main] ERROR com.company.test.Main - This
> is
> multiline
> log
> message
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]