hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleg Kalnichevski <ol...@apache.org>
Subject Re: Log any remote request made by httpClient 4.5.x
Date Mon, 27 Jan 2020 16:04:42 GMT
On Mon, 2020-01-27 at 16:58 +0100, Tamás Cservenák wrote:
> Oleg,
> 
> wire is "too much" for my use case.
> 
> I basically want an "access log"-like log, but for upstream.
> so method, URL (so, full URL or at scheme + host + port + path) and
> roundtrip time
> (time elapsed when the response line arrived). so to say like "access
> log"
> but on client side.
> 
> This log will most probably be post-processed as well (splunk,
> kibana) for
> later analysis. So,
> the size (contents) and output would need to be configurable by me as
> well.
> 

Disable logging for categories you do not want.

Refer to the `Enable context logging for connection management /
request execution` section as an example

Oleg


> 
> TIA
> T
> 
> On Mon, Jan 27, 2020 at 4:44 PM Oleg Kalnichevski <olegk@apache.org>
> wrote:
> 
> > On Mon, 2020-01-27 at 14:14 +0100, Tamás Cservenák wrote:
> > > Howdy,
> > > 
> > > I'd like to log ANY remote request httpClient 4.5.x does
> > > (stable),
> > > what is
> > > the best way to active that? (like "upstream" request log, so
> > > method
> > > + URL
> > > [schema://hostname/path]).
> > > 
> > > I'd like to cover cases even like httpClient CONNECT requests,
> > > httpClient
> > > retries (if configured to do so) and redirection following (if
> > > configured
> > > to do so).
> > > 
> > > Any existing class or best approach? Any help appreciated.
> > > 
> > 
> > Tamás
> > 
> > Any particular reason for not using HttpClient context and wire
> > logging?
> > 
> > http://hc.apache.org/httpcomponents-client-4.5.x/logging.html
> > 
> > Oleg
> > 
> > 
> > 
> > -----------------------------------------------------------------
> > ----
> > To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
> > For additional commands, e-mail: 
> > httpclient-users-help@hc.apache.org
> > 
> > 


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


Mime
View raw message