hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From JOSE L MARTINEZ-AVIAL <jlm...@gmail.com>
Subject Re: Logging of httpclient.wire.content depending on the target of the connection
Date Fri, 14 Jun 2013 05:18:49 GMT
I just took a quick look at the source code(4.3-alpha1), and it seems the
best option would be to modify
org.apache.http.impl.conn.SocketClientConnectionImpl so the wire created in
the constructor would be provided by a protected method. That way the
creation of the wire logger could be customized by extending
SocketClientConnectionImpl.
How does it sound?
















2013/6/13 Gary Gregory <garydgregory@gmail.com>

> It would be nice if the host was appended to the logger name, like:
>
> org.apache.http.SomeLogger.127.0.0.1
> org.apache.http.SomeLogger.localhost
> org.apache.http.SomeLogger.com.domain.myapp
>
> This would let you use the dots in IP addresses and domain names as
> hierarchical separators the same way they are used in Log4j.
>
> Gary
>
>
>
> On Thu, Jun 13, 2013 at 7:26 AM, JOSE L MARTINEZ-AVIAL <jlmagc@gmail.com
> >wrote:
>
> > Hi,
> >    I have an web application that uses Axis2 1.6.2 to connect to diferent
> > webservices. The underlying protocol is HTTP, so it uses httpcore-4.0 to
> > connect to the server. My problem is that for auditory reasons I need to
> > log the requests and responses received from a particular webservice, but
> > the other webservices should not be logged. I know I can setup
> > httpclient.wire.content to DEBUG in order to log the content of the
> > request/responses, but how I can do that dynamically depending on the
> > server the request is going to?
> >
> >   Thanks
> >
> > JL
> >
>
>
>
> --
> E-Mail: garydgregory@gmail.com | ggregory@apache.org
> Java Persistence with Hibernate, Second Edition<
> http://www.manning.com/bauer3/>
> JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
> Spring Batch in Action <http://www.manning.com/templier/>
> Blog: http://garygregory.wordpress.com
> Home: http://garygregory.com/
> Tweet! http://twitter.com/GaryGregory
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message