Get the tools you need to learn Java skills fast!
Video tutorials, eBooks, hands-on lab exercises, sample code.
Get started
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 Badass: Making Users Awesome this week in the Game Development forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Tomcat, @WebFault logging" Watch "Tomcat, @WebFault logging" New topic
Author

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.

Thanks
G
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Tomcat, @WebFault logging