curl-library
Re: CURLOPT_STDERR option not customizable
Date: Thu, 14 Mar 2002 08:08:36 +0100 (MET)
Hi,
I would vote for this solution. It is extensible and it would make it easy
to customize the debugging output at runtime.
Kind regards,
Noel
> On Wed, 13 Mar 2002, Jean-Philippe Barrette-LaPierre wrote:
> > do you consider it will put too much complexity for the API user to give
> > the possibility to set a different descriptor, for each type of output
> (and
> > by the same idea a different function)?
>
> I don't think we stop at three different kinds, as there's also different
> kinds of input and output. I can think of five different kinds off the top
> of
> my head:
>
> 1. info text
> 2. header input
> 3. header output
> 4. data input
> 5. data output
>
> The current VERBOSE option only shows 1 - 3 (sent to stderr with the *, <
> and
> > prefixes).
>
> > after that if you want to set a "<", ">" or "*" prefix, you just need to
> > make a function call for each of them, taht will set the prefix in the
> data
> > before it goes outputed
>
> What if we instead use a prototype similar to this?
>
> typedef enum {
> CURLINFO_TEXT,
> CURLINFO_HEADER_IN,
> CURLINFO_HEADER_OUT,
> CURLINFO_DATA_IN,
> CURLINFO_DATA_OUT,
> } curl_infotype;
>
> int information(CURL *handle, /* the handle/transfer this concerns
> */
> curl_infotype type /* what kind of data */
> char *data, /* points to the data */
> size_t size, /* size of the data pointed to */
> void *userp); /* whatever the user please */
>
> --
> Daniel Stenberg -- curl groks URLs -- http://curl.haxx.se/
>
>
>
-- GMX - Die Kommunikationsplattform im Internet. http://www.gmx.netReceived on 2002-03-14