...also, I wanted to log ALL requests httpclient sends....

So ended up with a LoggingRequestExecutor, something like this:
https://gist.github.com/cstamas/6a4165a64348490fa4fcdaa74757c966

but it looks to me like a hack. Also, unsure how to properly collect things
I need (ie. in case of proxy etc)


TIA
T

On Mon, Jan 27, 2020 at 4:58 PM Tamás Cservenák <ta...@cservenak.net> 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.
>
>
> TIA
> T
>
> On Mon, Jan 27, 2020 at 4:44 PM Oleg Kalnichevski <ol...@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-unsubscr...@hc.apache.org
>> For additional commands, e-mail: httpclient-users-h...@hc.apache.org
>>
>>

Reply via email to