Log4j2报错:MessageFactory2Adapter@47dab94f and is now requested with a null message factory (defaults to org.apache.logging.log4j.message.ParameterizedMessageFactory), which may create log events with unexpected formatting.

时间:2021-01-11 17:49:48

使用SpringBoot集成Log4j2报错:

WARN The Logger org.springframework.boot.bind.PropertiesConfigurationFactory was created with the message factory org.apache.logging.log4j.spi.MessageFactory2Adapter@47dab94f and is now requested with a null message factory (defaults to org.apache.logging.log4j.message.ParameterizedMessageFactory), which may create log events with unexpected formatting.

springboot版本:1.4.7

log4j2版本:2.6

查了下,这个是log4j2版本2.6的bug,把它升级到2.6.1就可以解决。bug相关信息查看:Misleading WARN log events from Log4j about message factories and unexpected formatting