WebSphere Application Server - Runtime changes to log4j.properties

This is Interesting: Free IT Magazines  
Home > Archive > WebSphere Application Server > August 2006 > Runtime changes to log4j.properties





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Runtime changes to log4j.properties

2006-08-23, 1:29 pm

Hi,
I am new to Websphere and earlier was using JBoss as my application server. We have an application packaged as a ear file. This ear file contains a log4j.properties file meant for our application. Is there any way that the changes to log4j.properties, wh
en the application is running, be picked up. In JBoss we had a Log4jTimerTask which used to keep checking the modified time of the log4j.xml file at regular intervals and if any changes were there they would be picked automatically without having to resta
rt the server or even redeploy the application. Is this possible in Websphere?

Thanks in advance.

2006-08-25, 7:31 pm

I don't know if you can have the log4j.properties reread while the application is running, but we pulled the properties file out of the EAR. At least that way we can make changes without repackaging the EAR.
We store our log4j.properties file in the properties directory under the WAS install. For example, /opt/IBM/WebSphere/AppServer/properties/log4j.properties.
Ben_

2006-08-25, 7:31 pm

Strange you wrote custom code for what is a built-in functionality of Log4J:
http://logging.apache.org/log4j/doc...nfigureAndWatch(java.lang.String).

Or is it something different you mean ?

For the file change, you can change the file directly under the
installedApps directory (a subsequent deployment will obviously make you
lose the changes).


Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com