I'm configuring logs for Logback.
XML configuration looks like:
<configuration>
<appender name="console" class="...">
<encoder>
<pattern>Message:%nText: %m</pattern>
</encoder>
</appender>
...
</configuration>
The idea is that log record should be multiline:
Message:
Text: [Message text here]
But when I run app, I get an exception:
ERROR in ch.qos.logback.core.pattern.parser.Compiler@8dbdac1 - There is no conversion class registered for conversion word [nText]
So, problem is that '%n' and 'Text' strings are merged to one string.
As a workaround, I can write them separately with space:
Message:%n Text: %m
But in this case, the space appears in logs before 'Text'
Message:
Text:
Is there some solution (escape character for empty string or similar)?
Thank you.