cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sergey Beryozkin (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CXF-7254) New LoggingFeature Sl4jEventSender does not log the request headers
Date Thu, 23 Feb 2017 16:15:44 GMT

    [ https://issues.apache.org/jira/browse/CXF-7254?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15880742#comment-15880742
] 

Sergey Beryozkin commented on CXF-7254:
---------------------------------------

Example, running a JAXRSClientServerBookTest.testGetBookQueryDefault produces
{noformat}
Feb 23, 2017 3:57:56 PM org.apache.cxf.ext.logging.slf4j.Slf4jEventSender send
INFO:
}
with the new feature - no information the request has even been made.
With the old feature we can see:

{noformat}
Feb 23, 2017 4:05:00 PM org.apache.cxf.interceptor.LoggingInInterceptor
INFO: Inbound Message
----------------------------
ID: 1
Address: http://localhost:9001/bookstore/books/query/default
Http-Method: GET
Content-Type: 
Headers: {Accept=[*/*], Cache-Control=[no-cache], connection=[keep-alive], Content-Type=[null],
Host=[localhost:9001], Pragma=[no-cache], User-Agent=[Apache-CXF/${project.version}]}
--------------------------------------

{noformat}

If we have a request with a payload (for JAXWS or JAXRS), in this case JAXRSClientServerBookTest.echoForm,
we see
the following with the new feature:

{noformat}
Feb 23, 2017 4:13:40 PM org.apache.cxf.ext.logging.slf4j.Slf4jEventSender send
INFO: a=aValue&b=b+value&c%25=cValue
{noformat}

but with the old feature it is
{noformat}
Feb 23, 2017 4:07:34 PM org.apache.cxf.interceptor.LoggingInInterceptor
INFO: Inbound Message
----------------------------
ID: 1
Address: http://localhost:9001/bookstore/form
Encoding: ISO-8859-1
Http-Method: POST
Content-Type: application/x-www-form-urlencoded
Headers: {Accept=[*/*], Cache-Control=[no-cache], connection=[keep-alive], Content-Length=[30],
content-type=[application/x-www-form-urlencoded], Host=[localhost:9001], Pragma=[no-cache],
User-Agent=[Apache-CXF/${project.version}]}
Payload: a=aValue&b=b+value&c%25=cValue
--------------------------------------

{noformat}

The following information is immediately important:
{noformat}

Address: http://localhost:9001/bookstore/form
Http-Method: POST
Content-Type: application/x-www-form-urlencoded
{noformat}

It is also useful to see the headers and the payload shown as one 'piece' and the payload
identified as "Payload:" as with the old feature.



> New LoggingFeature Sl4jEventSender does not log the request headers
> -------------------------------------------------------------------
>
>                 Key: CXF-7254
>                 URL: https://issues.apache.org/jira/browse/CXF-7254
>             Project: CXF
>          Issue Type: Bug
>          Components: logging
>            Reporter: Sergey Beryozkin
>             Fix For: 3.2.0, 3.1.11
>
>
> No request/response properties are reported which, in case of the requests with the empty
payloads, leads to no info reported at all, while for the requests with the payloads only
the payload INFO is displayed



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message