Actually, that should work if memory serves me correctly.  Are you saying the one in the jar file still gets picked up?  One thing you might need to do is to define the path as a fully qualified URL, such as....

-Dlog4j.configuration=file:/tmp/log4j.properties

...or, for windows....

-Dlog4j.configuration=file:C:/tmp/log4j.properties


If that doesn't work, for whatever reason, you can stick a log4j.properties file into WEB-INF/classes, which will get picked up before the one in the jar, therefore the one in the jar will be ignored.


Jake

On Wed, 07 Jan 2015 16:50:06 -0800
 Jason Novotny <jason.novo...@gmail.com> wrote:
Hi,

I have a WAR file that contains a jar file that has a log4j.properties file baked into it. I want to override that with my own production log4j.properties file.

I thought it would be sufficient to just add

-Dlog4j.configuration=/tmp/log4j.properties to my java command line parameters

but I see that doesn't work. Any ideas on how to do this?

Thanks, Jason

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-user-h...@logging.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-user-h...@logging.apache.org

Reply via email to