You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Keith Wall (JIRA)" <ji...@apache.org> on 2016/03/16 10:05:33 UTC

[jira] [Created] (QPID-7144) LoggingFilter response code logging is incorrect if servlet threw an exception

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: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org