markus markus - 1 year ago 119
Java Question

Change location of

I want to put all my config files in a

subfolder of my application directory. Log4j is expecting the file in the root folder of my application. Is there a way to tell log4j where to look for the properties file?

Answer Source

Yes, define log4j.configuration property

java -Dlog4j.configuration=file:/path/to/ myApp

Note, that property value must be a URL.

For more read section 'Default Initialization Procedure' in Log4j manual.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download