是否可以在log4j中创建一个ConversionPattern
Some short Msg : [INFO] class date
Some very looooooooooooooong msg : [INFO] class date
我基本上想要实现的是消息与左对齐,其余信息在n个字符后开始,因此其余信息很好地对齐而不是
Some short Msg : [INFO] class date
Some very looooooooooooooong msg : [INFO] class date
答案 0 :(得分:3)
只需将-
放在模式中:
%-50m | [%p] %c{1} %d %n"/