[gdal-dev] Logging network requests/replies?
Nyall Dawson
nyall.dawson at gmail.com
Thu Feb 7 19:43:03 PST 2019
On Thu, 7 Feb 2019 at 19:12, Even Rouault <even.rouault at spatialys.com> wrote:
>
> On mercredi 6 février 2019 19:54:29 CET Sean Gillies wrote:
> > Hi Nyall,
> >
> > Even will have the final word on this, but as far as I know, the
> > information printed when you turn on the following option
> >
> > https://trac.osgeo.org/gdal/wiki/ConfigOptions#CPL_CURL_VERBOSE
> >
> > is not capturable using the error handler from the GDAL API
>
> Yes CPL_CURL_VERBOSE=YES output goes to stderr by default, since this is curl
> which handles this.
> But I see in
> https://curl.haxx.se/libcurl/c/CURLOPT_DEBUGFUNCTION.html
> that we could possibly specify a callback instead of stderr so that it goes
> through GDAL logging mechanism.
>
Actually, what I had in mind (thinking out loud) would sit solely
within GDAL, e.g. a method to globally specify a callback function to
be called whenever GDAL creates a network request, e.g. within
CPLHTTPFetchEx (and similarly for replies). (With clients being
responsible for ensuring that their callback functions are
appropriately thread safe).
Does this sound desirable? Any concerns/blockers before I start hacking on it?
Nyall
> Even
>
> --
> Spatialys - Geospatial professional services
> http://www.spatialys.com
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/gdal-dev
More information about the gdal-dev
mailing list