Gianluca created LOGBACK-1261:
---------------------------------

             Summary: %replace(%msg){'\n','\n'} is not working
                 Key: LOGBACK-1261
                 URL: https://jira.qos.ch/browse/LOGBACK-1261
             Project: logback
          Issue Type: Bug
    Affects Versions: 1.2.1
            Reporter: Gianluca
            Assignee: Logback dev list


This pattern is not working 
{code:xml}
<pattern>%d{HH:mm:ss.SSS} %-5level %logger{36} - 
%replace(%msg){'\n','\n'}%n</pattern>{code}
This string "line a \n line b" becomes "line a n line b" (on the same line)

Workaround:

use regex capture pattern

 
{code:xml}
<pattern>%d{HH:mm:ss.SSS} %-5level %logger{36} - 
%replace(%msg){'(\n)','$1'}%n</pattern>{code}
This partially solve the problem because it is not possible to add different 
escaped char like a tab '\t'



--
This message was sent by Atlassian JIRA
(v7.3.1#73012)
_______________________________________________
logback-dev mailing list
logback-dev@qos.ch
http://mailman.qos.ch/mailman/listinfo/logback-dev

Reply via email to