curl-library
Re: print curl_easy_setopt in debug function
Date: Fri, 08 Jun 2018 12:53:04 -0400
On June 6, 2018 2:37 PM, Daniel Stenberg <daniel_at_haxx.se> wrote:
> On Wed, 6 Jun 2018, Dan Fandrich wrote:
>
> > > Could we have some logs for this in libcurl itself?
> >
> > I think this would be a hard sell. libcurl logs are intended to give a view
> >
> > into the inner workings of libcurl that aren't available elsewhere, but
> >
> > logging the set options is easily done in the application. It would also be
> >
> > dozens of log lines in many situations which would hide other, useful log
> >
> > entries in their volume.
>
> I agree that this would add interesting information in some cases, but I also
>
> think its a bit excessive logging for the vast majority. A minor downside with
>
> our single-bit logging flag.
>
> If libcurl should do this, I think I'd argue for requiring some extra knob to
>
> be turned on first before it gets sent to the debug callback/output. Which I
>
> realize in itself might make it less interesting to some users...
>
>
> -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> /daniel.haxx.se
>
How about printing it with a new enum in curl_infotype::CURLINFO_OPTIONS, so people who want it can print it out and have their own switch for it.
I Experimented a bit by adding Curl_debug(...) to Curl_vsetopt(...) but it seems that it requires struct connectdata*, How could I get this data in Curl_vsetopt(...)?
- Tejas
-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2018-06-08