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