logback-没有行尾定界符 [英] logback - no end of line delimiter
本文介绍了logback-没有行尾定界符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用 logback 0.9.21 .不幸的是,它会将所有消息都打印到一行,没有行尾字符,甚至是错误的一行.
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.
我已经正确设置了图案AFAIK:
I've got the pattern set right AFAIK:
<pattern>%d{HH:mm:ss.SSS} %-5level %class (%thread) [%logger{36}] -- %msg%n</pattern>
有什么收获?
推荐答案
找到它后,方括号在模式布局中具有特殊含义,因此必须将其转义. 因此模式应如下所示:
Found it, the brackets have 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>
这篇关于logback-没有行尾定界符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文