tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shapira, Yoav" <Yoav.Shap...@mpi.com>
Subject RE: Logging
Date Mon, 20 Jan 2003 16:13:26 GMT
Howdy,
Here's one way: use log4j.  Configure a file appender with some pattern that includes your
hostname in the MDC.  That's exactly the sort of thing MDC (Mapped Diagnostic Context) in
log4j was designed for.  For more details, see the PatternLayout and MDC class javadocs at
http://jakarta.apache.org/log4j/docs/api/index.html

If you have questions regarding usage of log4j, we'll be happy to help you on the log4j user
mailing list ;)

As an aside, I think tomcat already provides more than adequate logging capabilities for a
servlet container.  Tomcat is not a logging toolkit.  That's why we have things like log4j
;)  Combine these two best of breed solutions and you can enjoy a lot of benefits...

Yoav Shapira
Millennium ChemInformatics


>-----Original Message-----
>From: Brandon Cruz [mailto:bcruz@norvax.com]
>Sent: Monday, January 20, 2003 11:13 AM
>To: Tomcat Users List
>Subject: RE: Logging
>
>I have been trying to do the same thing, unfortunately I have not found a
>way to make this happen yet.
>
>Brandon
>
>-----Original Message-----
>From: Reynir Hübner [mailto:reynir@hugsmidjan.is]
>Sent: Monday, January 20, 2003 9:59 AM
>To: Tomcat Users List
>Subject: Logging
>
>
>Is it possible somehow to set the logger in tomcat (FileLogger) so that it
>will tell which application the exception happenes.
>My problem is this :
>I have a server running serveral virtual hosts, most running the same
>web-applications. When an exception is caused it gets stack-trace-printed
>to
>the standard out, but it's impossible for me to determine which application
>it happenes in. Is it possible to configure the FileLogger to display where
>it happenes ?
>
>Thanx
>-reynir
>
>--
>To unsubscribe, e-mail:
><mailto:tomcat-user-unsubscribe@jakarta.apache.org>
>For additional commands, e-mail:
><mailto:tomcat-user-help@jakarta.apache.org>
>
>
>
>--
>To unsubscribe, e-mail:   <mailto:tomcat-user-
>unsubscribe@jakarta.apache.org>
>For additional commands, e-mail: <mailto:tomcat-user-
>help@jakarta.apache.org>


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


Mime
View raw message