Tomcat log include servlet context

Posted by Kris on Server Fault See other posts from Server Fault or by Kris
Published on 2010-02-10T16:17:03Z Indexed on 2010/03/24 12:03 UTC
Read the original article Hit count: 312

Filed under:
|

I have a Tomcat instance running several websites. Recently I've been trying to deal with the various error messages that wind up in the Tomcat log file (catalina.out). None of the issues are affecting the websites, but all the noise is making it difficult to see actual problems.

My problem is that frequently the message is being emitted by a library that is used by multiple webapps. Unless a stacktrace is included (which it often isn't) I can't tell which webapp is responsible without a lot of digging.

So the question is, can I somehow configure Tomcat to include the servlet context in the log file? Or perhaps have different log files per context?

© Server Fault or respective owner

Related posts about tomcat

Related posts about logging