Discussion:
logging using log4j with httpclient 5 beta ?
Rémy Amouroux
2018-03-27 15:20:37 UTC
Permalink
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
Oleg Kalnichevski
2018-03-28 07:49:37 UTC
Permalink
Post by Rémy Amouroux
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-***@hc.apache.org
For additional commands, e-mail: httpclient-users-***@hc.apache.org
Loading...