Uploaded image for project: 'HttpComponents HttpClient'
  1. HttpComponents HttpClient
  2. HTTPCLIENT-1374

Provide functionality to customize the logging of the http headers and wire

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 4.3 Final
    • HttpClient (classic)
    • None

    Description

      Currently the logging of the http headers and data (wire) exchanged when doing a HTTP request/response is controlled by the logging categories org.apache.http.headers and org.apache.http.wire. The problem is that the logging cannot by customized: It is possible to setup the debug level, and change it dynamically, but those changed affect all the instances of the HttpClient, since the logger is static. So it is not possible to change the logging for a specific connections, for example.

      The patch I modifies ManagedHttpClientConnectionFactory so the loggers are created by using two protected methods getHeaderlog and getWirelog. That way the factory can be extended in order to provide diferent logges, and therefore allow to customize the logging of the http headers and data.

      Attachments

        1. HTTPCLIENT-1374.patch
          1 kB
          Jose L Martinez-Avial

        Activity

          People

            Unassigned Unassigned
            jlmagc Jose L Martinez-Avial
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: