Understanding Classloaders: log4j in a J2EE Environment
Subject:   At first sight I agree, but.......
Date:   2003-04-15 04:23:46
From:   anonymous2
Response to: At first sight I agree, but.......

I have managed to get Log4J to be configurable at runtime by setting the system property log4j.configuratorClass. This property is used by Log4J to specify the configurator class used during the default initialisation. We then wrote a configurator to allow Log4J to watch the config file for updates.

This method works fine, but it does mean that this configurator is used for all applications using Log4J on that server. This in turn implies that you have one configuration file for each server (i.e. it applies to all the apps running on that server).

Whilst it would be nice to separate the logging configuration for each app on a j2ee server, in practise it's not that bad. Our support administrators like to configure logging on a per server basis anyway.