Allow fine grained logging level in FullAjaxExceptionHandler #258

Closed
vanduynslagerp opened this Issue Jun 2, 2016 · 3 comments

Projects

None yet

2 participants

@vanduynslagerp
Contributor

FullAjaxExceptionHandler always log with the method logException. It can be overwritten to change the log level, however it's not possible to set a different log level based on the cause of the error.

L401 and L438 are "unexpected" error, in the sense that throwing an Exception after the response is commited or attempting to display an error page containing errors is a programation error. Therefore these cases make sense to be logged with the SEVERE level.

Although L392 and L396 are "expected" errors in the sense that the exception handler performed as expected by redirecting to a working error page.

Ideally we should keep logging L401 and L438 as SEVERE and allow to choose the log level for L392 and L396, either by overriding logException or with a Web.xml parameter.

@BalusC
Member
BalusC commented Jun 2, 2016

Makes sense.

@BalusC BalusC closed this in 277dc15 Jun 2, 2016
@BalusC
Member
BalusC commented Jun 2, 2016

I added a protected enum LogReason indicating the log reason and a new logException() overload where this is passed. It's available in today's 2.4-SNAPSHOT.

Thank you for improving OmniFaces!

@vanduynslagerp
Contributor

Thanks !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment