views:

36

answers:

1

I'm using logback 0.9.21 . Unfortunately it prints all messages to single line, there is no end of line character, even wrong one.

I've got the pattern set right AFAIK:

<pattern>%d{HH:mm:ss.SSS} %-5level %class (%thread) [%logger{36}] -- %msg%n</pattern>

What's the catch?

A: 

Found it, the brackets has special meaning in the pattern layout therefore they must be escaped. So the pattern should look this way:

<pattern>%d{HH:mm:ss.SSS} %-5level %class \(%thread\) [%logger{36}] -- %msg%n</pattern>
binary_runner