Keith Wall created QPID-7144:
--------------------------------

             Summary: LoggingFilter response code logging is incorrect if 
servlet threw an exception
                 Key: QPID-7144
                 URL: https://issues.apache.org/jira/browse/QPID-7144
             Project: Qpid
          Issue Type: Bug
          Components: Java Broker
            Reporter: Keith Wall
            Priority: Minor


The following log line produces misleading information (logs wrong status code) 
if the servlet ends with an uncaught exception.

{{code}}
LOGGER.debug("RESPONSE user='{}' method='{}' url='{}' status='{}'", user, 
method, url, responseStatus);
{{code}}

The problem is at the point the log is written the response code may not have 
been assigned.  In the problematic case the servlet has ended with an as yet 
uncaught exception which won't be translated into a 500 until it is caught by 
Jetty higher up the stack.

The code probably ought to be refactored to use an servlet error handler.




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to