Log4j2 configuration not found when running standalone application built by shade plugin

前端 未结 4 2130
旧时难觅i
旧时难觅i 2020-12-09 02:31

I have application which when I run from maven log4j2 it is working:

mvn exec:java -Dexec.args=...

but when I run jar as standalone applica

4条回答
  •  遥遥无期
    2020-12-09 02:49

    I have resolved this issue by adding the following line in the run configuration.

    -Dlog4j.configurationFile=C:\Users\aaa\Desktop\deploy\bin\log4j2.xml
    

    My Log4j version is

    2.12.1

提交回复
热议问题