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 Rémy Amouroux <re...@gmail.com> on 2018/03/27 15:20:37 UTC

logging using log4j with httpclient 5 beta ?

Hi All

I’m trying to use httpclient 5 beta to discuss to a http2 server through a proxy.

For the moment, my log4j configuration includes

log4j.logger.org.apache.hc.client5.http=DEBUG
log4j.logger.org.apache.hc.client5.http.wire=ERROR

while it allows me to see part of the communication between client and server, I don’t see the protocol negotiation.
Is there somewhere an explanation of the possible logging options for httpclient 5 ?

Regards

remyA

Re: logging using log4j with httpclient 5 beta ?

Posted by Oleg Kalnichevski <ol...@apache.org>.
On Tue, 2018-03-27 at 17:20 +0200, Rémy Amouroux wrote:
> Hi All
> 
> I’m trying to use httpclient 5 beta to discuss to a http2 server
> through a proxy.
> 
> For the moment, my log4j configuration includes
> 
> log4j.logger.org.apache.hc.client5.http=DEBUG
> log4j.logger.org.apache.hc.client5.http.wire=ERROR
> 
> while it allows me to see part of the communication between client
> and server, I don’t see the protocol negotiation.
> Is there somewhere an explanation of the possible logging options for
> httpclient 5 ?
> 
> Regards
> 
> remyA

Hi Remy

HC 5 documentation is virtually non-existent at this point. I would
like to put some effort into it but I cannot commit to a particular
time line.

For now examples [1] and test code [2] is the best reference.

There is a log4j configuration template with some common logging
categories one can use as a starting point:

https://github.com/apache/httpcomponents-client/blob/master/httpclient5
-testing/src/test/resources/log4j2-debug.xml.template  

Oleg

[1] https://github.com/apache/httpcomponents-client/tree/master/httpcli
ent5/src/examples/org/apache/hc/client5/http/examples
[2] https://github.com/apache/httpcomponents-client/tree/master/httpcli
ent5-testing

---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org