wood burning stoves 2.0*
The moose likes Tomcat and the fly likes Tomcat, @WebFault logging Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Tomcat, @WebFault logging" Watch "Tomcat, @WebFault logging" New topic

Tomcat, @WebFault logging

Gavin Tranter
Ranch Hand

Joined: Jan 01, 2007
Posts: 333
I have a webservice that uses JAX-WS running in a Tomcat container.
The Service uses log4j as it logger, while Tomcat is using Java.util.logging (or rather its extension to it).

We have the service logging to its own log file, so as to keep the catalina log file for tomcat logging and the service log file for the service.

However when we get a service exception, it is to be logged in both logs, now i have tried all ways i can think of, and short of removing the console appender/handler from the tomcat configuration I cant get the exception to remain in the service log file.

I have checked for System.out and System.err and also for Throwable.printStackTrace and we are clean of those.

So how is this exception getting logged by both log files? Given that it seems to be the console handler that is logging the exception, I was wondering if it could be to do with the @WebFault annotation our exception has, that perhaps tomcat was reading and logging these exceptions at the container level?

I will be writing an experiment, but thought i would ask teh question here, in case there was something else I may have missed.

I agree. Here's the link: http://aspose.com/file-tools
subject: Tomcat, @WebFault logging
Similar Threads
Tomcat hangs when app start-up fails
Exception stack trace in logger
How to extract the exception that caused a SOAP fault
One Log File
NX: which logging file?