See: http://nagoya.apache.org/wiki/apachewiki.cgi?Log4JProjectPages/UsefulCode

especially the links for...


Some custom repository selectors can be found in the current log4j cvs at <http://cvs.apache.org/viewcvs/jakarta-log4j-sandbox/src/java/org/apache/log4j/selector/>http://cvs.apache.org/viewcvs/jakarta-log4j-sandbox/src/java/org/apache/log4j/selector/. They will be released, in some packaged form, with v1.3, but they are compatible with current v1.2.X.



----------
Web Application - Servlet related log4j classes can be found in the current log4j cvs at <http://cvs.apache.org/viewcvs/jakarta-log4j-sandbox/src/java/org/apache/log4j/servlet/>http://cvs.apache.org/viewcvs/jakarta-log4j-sandbox/src/java/org/apache/log4j/servlet/. They will be released, in some packaged form, with v1.3, but they are compatible with the current v1.2.X.



I wrote the selectors and the InitContextListener . The javadoc should explain how to use this stuff. You won't have to worry about log4j accidentally loading the wrong configuration file using this setup.


Jake


At 03:20 PM 3/28/2003 -0500, you wrote:



Jagadeesan,Sivakumar wrote:

In my web application, I have to set  system property to point to my config
file. This is kind of not good. Sometimes if I am deploying my application
in some ones server (like a Web Hosting Service Provider), I will not be
able to have such a system property, nor I could change the startup script
of the app server . So there should be some other way to do this.

I'm not writing to disagree with you, in fact what I'm about to say is sort of off-topic -- but couldn't you write a ContextListener that sets a System Property by reading a configuration file (of your own creation)?


Admittedly this gets a little convoluted -- you're using a config file to tell a ContextListener to set a System Property pointing to another config file that tells Log4J how to configure itself. But in theory does it work?


Erik



--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to