刚上手log4j2 ,就想着跑一个小的demo,但是出现了问题。配置的一步中有要进行xml文件的创建,我是这么创建的:
设置好名称后,然后选择xml:
出来的结果是线下图的那个log4j2文件,注释注意,是那个不带xml后缀的那个。然后我就傻乎乎的跑测试用例,就结果就是找不到那个xml位置。
报错:ERROR StatusLogger No Log4j 2 configuration file found. Using default configuration (logging only errors to the console), or user programmatically provided configurations. Set system property ‘log4j2.debug’ to show Log4j 2 internal initialization logging. See https://logging.apache.org/log4j/2.x/manual/configuration.html for instruction
记一次惨痛的教训- log4j2 实际使用详解-xml配置
最新推荐文章于 2024-05-17 23:42:20 发布