You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Cyrille Le Clerc (JIRA)" <ji...@apache.org> on 2009/12/30 14:09:29 UTC
[jira] Resolved: (CXF-2597) Add response code to LoggingFeature for
REST/JAX-RS specific response codes
[ https://issues.apache.org/jira/browse/CXF-2597?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Cyrille Le Clerc resolved CXF-2597.
-----------------------------------
Resolution: Fixed
Fix Version/s: 2.3
2.2.6
Response code added to the log message.
Response message was not added as the payload of the message should hold enough information to debug.
> Add response code to LoggingFeature for REST/JAX-RS specific response codes
> ---------------------------------------------------------------------------
>
> Key: CXF-2597
> URL: https://issues.apache.org/jira/browse/CXF-2597
> Project: CXF
> Issue Type: Improvement
> Components: Core
> Affects Versions: 2.2.5, 2.3
> Reporter: Cyrille Le Clerc
> Assignee: Cyrille Le Clerc
> Fix For: 2.2.6, 2.3
>
> Attachments: CXF-2597.patch
>
>
> As REST services use custom (http) response codes, it is very valuable to display the response code in the logs outputted by the LoggingFeature (ie LoggingInInterceptor & LoggingOutInterceptor).
> I have a pending question : would it be interesting to add the response message (e.g. "Not Found") in addition to the response code ?
> It would require to add it to the Message attributes in the HttpConduit and to create the associated constant on {{o.a.c.message.Message}}.
> {noformat:title=Current log message without the response code}
> 2009/12/30 11:08:59,563 INFO [http-8080-3] org.apache.cxf.interceptor.LoggingInInterceptor - Outbound Message
> ---------------------------
> ID: 26
> Content-Type: text/html
> Headers: {Date=[Wed, 30 Dec 2009 10:08:59 GMT]}
> Payload: Hi cyrille
> --------------------------------------
> {noformat}
> {noformat:title=Enhanced log message with the response code}
> 2009/12/30 11:08:59,563 INFO [http-8080-3] org.apache.cxf.interceptor.LoggingInInterceptor - Outbound Message
> ---------------------------
> ID: 26
> Response-Code: 200
> Content-Type: text/html
> Headers: {Date=[Wed, 30 Dec 2009 10:08:59 GMT]}
> Payload: Hi cyrille
> --------------------------------------
> {noformat}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.