tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shapira, Yoav" <>
Subject RE: Logging
Date Mon, 20 Jan 2003 16:13:26 GMT
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

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 []
>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.
>-----Original Message-----
>From: Reynir Hübner []
>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
>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 ?
>To unsubscribe, e-mail:
>For additional commands, e-mail:
>To unsubscribe, e-mail:   <mailto:tomcat-user-
>For additional commands, e-mail: <mailto:tomcat-user-

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message