-
1. Re: Logging all uncaught exceptions to a separate Logger?
matt.drees Oct 11, 2007 6:25 PM (in response to stephen.friedrich)Try overriding org.jboss.seam.exception.exceptions. That will let you log any exception caught inside Seam, and your filter should let you log anything not caught by seam.
-
2. Re: Logging all uncaught exceptions to a separate Logger?
stephen.friedrich Oct 11, 2007 6:48 PM (in response to stephen.friedrich)Thanks a lot, Matt, for the fast answer! That is working great.
I already looked at the Exceptions class and figured I could use a catch-all handler that redirects to an error page that has a page action that calls a component that gets injected the handledException and logs it :-(
Besides being just a tiny bit too complex, this had the disadvantage that I could not log the original request URL that caused the exception.
Never occurred to me that since this is a seam component I can replace it. -
3. Re: Logging all uncaught exceptions to a separate Logger?
stephen.friedrich Oct 16, 2007 5:55 AM (in response to stephen.friedrich)Addition for anybody who might find this post later on - including myself ;-)
My own servlet filter never caught any exceptions.
Turned out that Seam's built-in filter already logs and swallows all exceptions.
Luckily it is a simple log4j configuration to redirect that log:<category name="org.jboss.seam.web.ExceptionFilter"> <priority value="ERROR"/> <appender-ref ref="error"/> </category>
-
4. Re: Logging all uncaught exceptions to a separate Logger?
pmuir Oct 16, 2007 8:28 AM (in response to stephen.friedrich)You should add this as a FAQ on the wiki...