Details
-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
0.9.26
-
None
Description
I started using the SMTPAppender and defined this pattern layout:
<Pattern>Zeitstempel: %date%(%n)Kontext: %contextName%(%n)Angeforderte URI: %X
%(%n)QueryString: %X
{req.queryString}%(%n)Nachricht: %msg</Pattern>
I do receive single log messages only so I don't need a %n at the end. Unfortunately, my log messages are messed up.
Instead of:
Nachricht: <msg>
<ex>
as the default log layout, I get:
Nachricht: <msg><ex>
I added a %n and it solved the problem. I was able to reproduce this with the FileAppender but this behavior make no sense. The exception is part of the message and should always include a \n internally unless a %ex is exlicitly defined. The last %n includes two line feed at once.