Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Tomcat, @WebFault logging

 
Gavin Tranter
Ranch Hand
Posts: 333
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic