You are viewing a plain text version of this content. The canonical link for it is here.
Posted to httpclient-users@hc.apache.org by Joan Balaguero <jo...@grupoventus.com> on 2012/09/02 13:33:07 UTC

Log

Hello,

 

I’m trying to debug a request/response. I set this in my log4.xml:

 

    <!-- HTTP log for debug purposes -->

       <appender name="HTTP_LOG" class="org.apache.log4j.FileAppender">

             <param name="file" value="/var/log/ventus/joan/http4.log"/>

             <param name="threshold" value="DEBUG"/>

             <param name="append" value="true"/>

             <param name="immediateFlush" value="true"/>

             

             <layout class="org.apache.log4j.PatternLayout">

                  <param name="conversionPattern" value="%m%n"/>

             </layout>    

       </appender>

       

       <logger name="org.apache.http.impl.conn">

        <level value="FINEST"/>

        <appender-ref ref="HTTP_LOG"/>

       </logger> 

 

       <logger name="org.apache.http.impl.client">

        <level value="FINEST"/>

        <appender-ref ref="HTTP_LOG"/>

       </logger>

       

       <logger name="org.apache.http.client">

        <level value="FINEST"/>

        <appender-ref ref="HTTP_LOG"/>

       </logger>

 

 

Then I get:

 

Connection request: [route: {}->http://tickets.vueling.com][total kept
alive: 0; route allocated: 0 of 1000; total allocated: 0 of 1000]

Connection leased: [id: 0][route: {}->http://tickets.vueling.com][total kept
alive: 0; route allocated: 1 of 1000; total allocated: 1 of 1000]

Connecting to tickets.vueling.com:80

CookieSpec selected: best-match

Auth cache not set in the context

Target auth state: UNCHALLENGED

Proxy auth state: UNCHALLENGED

Attempt 1 to execute request

Sending request: POST /XmlSearch.aspx HTTP/1.1

Receiving response: HTTP/1.1 200 OK

Cookie accepted: "[version: 0][name: ASP.NET_SessionId][value:
tvx4id55hmrcq2fmco002m55][domain: tickets.vueling.com][path: /][expiry:
null]". 

Cookie accepted: "[version: 0][name:
BIGipServervueling-skysales3.4-www][value:
jlOCz9CQ5EnlQbxBnfFbQQTTTyksQJpq1FCnhbPn6I+ZYL4HS8Dp4VG7JCdpKYvFYreq+NoFdVwD
MNQ=][domain: tickets.vueling.com][path: /][expiry: null]". 

Connection can be kept alive for 3600000 MILLISECONDS

Connection [id: 0][route: {}->http://tickets.vueling.com] can be kept alive
for 3600000 MILLISECONDS

Connection released: [id: 0][route: {}->http://tickets.vueling.com][total
kept alive: 1; route allocated: 1 of 1000; total allocated: 1 of 1000]

Connection request: [route: {}->http://tickets.vueling.com][total kept
alive: 1; route allocated: 1 of 1000; total allocated: 1 of 1000]

Connection leased: [id: 0][route: {}->http://tickets.vueling.com][total kept
alive: 0; route allocated: 1 of 1000; total allocated: 1 of 1000]

CookieSpec selected: best-match

Cookie [version: 0][name: ASP.NET_SessionId][value:
tvx4id55hmrcq2fmco002m55][domain: tickets.vueling.com][path: /][expiry:
null] match [tickets.vueling.com:80/favicon.ico]

Cookie [version: 0][name: BIGipServervueling-skysales3.4-www][value:
jlOCz9CQ5EnlQbxBnfFbQQTTTyksQJpq1FCnhbPn6I+ZYL4HS8Dp4VG7JCdpKYvFYreq+NoFdVwD
MNQ=][domain: tickets.vueling.com][path: /][expiry: null] match
[tickets.vueling.com:80/favicon.ico]

Auth cache not set in the context

Target auth state: UNCHALLENGED

Proxy auth state: UNCHALLENGED

Attempt 1 to execute request

Sending request: GET /favicon.ico HTTP/1.1

Receiving response: HTTP/1.1 404 Not Found

Connection can be kept alive for 3600000 MILLISECONDS

 

 

But I need to see what headers and parameters are being sent with the
request. Is this possible?

 

Thanks,

Joan.