[英]Log4j2 log formatting - empty square bracket
I recently upgraded log4j-1x to log4j-2.17.2.我最近将 log4j-1x 升级到 log4j-2.17.2。 This was my formatting pattern:这是我的格式化模式:
%d{ISO8601} [%t] %-5p %x - %m%n
But the output is like this:但是输出是这样的:
2022-07-08T00:59:59,392 [localhost-startStop-1] INFO [] - Quartz scheduler version: 1.8.5
I am not sure where the empty square brackets []
are coming from, after the log priority.在日志优先级之后,我不确定空方括号[]
来自哪里。 INFO
in above case.上述情况下的INFO
。 How to remove it, without disturbing the format.如何在不影响格式的情况下删除它。
我认为因为您没有在该 INFO 级别记录任何信息,所以如果 epty 方括号仍然为空,请尝试记录一些内容
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.