OpenNTF / org.openntf.xsp.jakartaee

XPages Jakarta EE support libraries
Apache License 2.0
21 stars 7 forks source link

Add configuration option to log unhandled exceptions to the error log #516

Open jesse-gallagher opened 7 months ago

jesse-gallagher commented 7 months ago

Currently, the exception mappers just emit the exception to the client. However, in some cases, and particularly during development, it'd be very useful to have these logs go to error-log-x.xml instead. It could make sense for an Application property to specify this, or something in xsp.properties.

slapraik-intec commented 5 months ago

A couple of ideas here...

  1. Would it be possible to integrate OpenLog.nsf here?
  2. Would it be possible within code to dynamically change the path of the target log database/file? i.e. an app and/or api may have different log dbs/files depending on what data it is dealing with, so the code needs to know what it is dealing with before it can determine which log to use.
jesse-gallagher commented 5 months ago

That's another category that I've pondered. My experiences with Java logging frameworks other than just java.util.logging make me very, very wary of adding any in, but it could be worth looking into making it internally service-based, with a default using just normal JUL. Ideally, Domino itself would have a better handler than the old IBM one, and that could be its own neat project.