qpid-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Keith Wall (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (QPID-7144) LoggingFilter response code logging is incorrect if servlet threw an exception
Date Wed, 16 Mar 2016 09:05:33 GMT

     [ https://issues.apache.org/jira/browse/QPID-7144?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Keith Wall updated QPID-7144:
-----------------------------
    Description: 
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.


  was:
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.



> 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


Mime
View raw message