在使用log4j 2.10.x时候,如果只是添加 log4j-core.2.10.x.jar和log4j-api-2.10.x,同时配置文件采用 .yaml文件,则会报错:
RROR StatusLogger No log4j2 configuration file found. Using default configuration: logging only errors to the console. Set system property 'log4j2.debug' to show Log4j2 internal initialization logging.
只需要在依赖中添加
snakeyaml.x.y.z.jar
jackson-databind.x.y.z.jar
jackson-dataformat-yaml.x.y.z.jar
这三个jar包即可