I currently have two interceptors that handle a similar function. I would like to combine them.
One interceptor is an access request logger that shows the logged in user, session ID, and requested URL.
Another interceptor is the process logger.
An access registrar, in order to register everything that needs to be registered, registers the request in the preHandle method. The idea is that no matter what happens after (i.e. Exceptions), an exact access request will be available.
However, the process logger, by its nature, must register the postHandle method.
To merge this functionality, I would have to move everything to one postHandle method. However, it seems that I might lose some logging if an exception occurs somewhere, especially one that has not yet been properly handled in the application code.
Are there any guarantees or descriptions of these considerations?
source share