1. 程式人生 > >log4j2.yaml找不到配置檔案問題

log4j2.yaml找不到配置檔案問題

在使用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包即可