tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Elankath, Tarun (Cognizant)" <ETa...@blr.cognizant.com>
Subject RE: [OFF-TOPIC] RE: jdk1.4 logging in different log files per web application
Date Mon, 05 May 2003 14:25:16 GMT
Hi, 

Maybe you can use the "java.util.logging.config.file" system property to specify the location
of the properties file. This would be one value per JVM, which doesn't offer any degree of
convenience over looking in jre/lib.

Global properties are set on LogManager which is a single global shared object for the entire
JVM. (AFAIK)
If you wish to have clear separation between the logging.properties of each web-application,
then you would need to do 2 things:
1)Make sure that there are no "conflicting" properties for each web-app. You can ensure this
by using the context-name of the web-application as the logger name instead of using the package
name. (or some other scheme)
2)Have a load-on-startup servlet that does something similar to the following:
        LogManager.readConfiguration(this.getClass().getResourceAsStream("/logging.properties"));

Here logging.properties must be in WEB-INF/classes.

You have some degree of separation here, even if it isn't perfect.

Hope that helps,
Tarun




-----Original Message-----
From: Shapira, Yoav [mailto:Yoav.Shapira@mpi.com]
Sent: Monday, May 05, 2003 6:20 PM
To: Tomcat Users List
Subject: [OFF-TOPIC] RE: jdk1.4 logging in different log files per web
application



Howdy,
Please mark a question as [OFF-TOPIC] when you're about to ask one, if
you're asking one to this list at all.

Sorry I can't help with your specific question: I know how to do it in
log4j, as it's a FAQ there and many answers are available on the
log4j-user list archive.  I don't use JDK 1.4 logging so I don't know
there...


Yoav Shapira
Millennium ChemInformatics


>-----Original Message-----
>From: k p [mailto:kpandeyktm@yahoo.com]
>Sent: Sunday, May 04, 2003 3:44 PM
>To: tomcat-user@jakarta.apache.org
>Subject: jdk1.4 logging in different log files per web application
>
>Hi
>I have the jdk1.4 logging working with calls made via
>common-logging APIs. However I'm setting the
>logging.properties files at $JAVA_HOME/jre/lib hence
>its applicable to all my web apps.
>
>How do I control say output filehandler for each
>webapps to point to different files. I tried updating
>the common.proprtries and adding  logging.properties
>under WEB-INF/classes but it doesn't pick it up from
>there.
>
>Thanks
>Kumar
>
>__________________________________
>Do you Yahoo!?
>The New Yahoo! Search - Faster. Easier. Bingo.
>http://search.yahoo.com
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org




This e-mail, including any attachments, is a confidential business communication, and may
contain information that is confidential, proprietary and/or privileged.  This e-mail is intended
only for the individual(s) to whom it is addressed, and may not be saved, copied, printed,
disclosed or used by anyone else.  If you are not the(an) intended recipient, please immediately
delete this e-mail from your computer system and notify the sender.  Thank you.


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message