how to load an external log4j2.xml when running a standalone application?

2017-08-08 Thread LV XIAOYI
Hi all, I have an executable jar, and I run it with this command: java -jar .\my.jar if log42j.xml in my.jar, it is working, if log42.xml out of my.jar, it is not working. I try the “-Dlog4j.configurationFile” to load log4j2.xml like this: java -Dlog4j.configurationFile=.\log4j2.xm

Fwd: how to load an external log4j2.xml when running a standalone application?

2017-08-08 Thread Ralph Goers
The problem you are experiencing is that the command line shell is not treating log4j.configurationFile as a variable name. Try putting it in single quotes. Ralph > Begin forwarded message: > > From: LV XIAOYI > Subject: how to load an external log4j2.xml when running a standalone > applicati