wood burning stoves 2.0*
The moose likes Websphere and the fly likes Runtime changes to log4j.properties Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Products » Websphere
Bookmark "Runtime changes to log4j.properties" Watch "Runtime changes to log4j.properties" New topic

Runtime changes to log4j.properties

Jaikiran Pai

Joined: Jul 20, 2005
Posts: 9961

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, when the application is running, be picked up. Is this possible in Websphere? I would like the changes to be picked up without having to redeploy the application or restart the server.

Thanks in advance.

[My Blog] [JavaRanch Journal]
Jeanne Boyarsky
internet detective

Joined: May 26, 2003
Posts: 30138

You definitely don't need to redeploy. I think you do need to restart the application though. If you are using clones, you can restart one clone at a time.

[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Jaikiran Pai

Joined: Jul 20, 2005
Posts: 9961

Thanks, Jeanne Boyarsky, for that answer.
Arshad Sharief

Joined: Feb 23, 2006
Posts: 14

To pick up the changes from log4j.properties file without restarting or redeploying the app, use


in your init() method.It will look for any changes in properties file, for every 60 sec(default), you can also change the timings.

Don't get me started about those stupid light bulbs.
subject: Runtime changes to log4j.properties
Similar Threads
Where to find jar mapping in WAS 6.0
Hibernate - Can I put hibernate.properties in an ear file?
log4j.properties file outside application
Log4J with System.out.prinltn