logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Delphin (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (LOG4J2-1364) PatternLayout can't put newline in substitution
Date Wed, 13 Apr 2016 13:01:25 GMT

     [ 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: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org


Mime
View raw message