[gdal-dev] Logging network requests/replies?

Robert Coup robert.coup at koordinates.com
Sun Feb 10 14:06:30 PST 2019


Hi all,

On Sat, 9 Feb 2019 at 00:59, Even Rouault <even.rouault at spatialys.com>
wrote:

> I had several thoughts about this
>
> 1) yes a dedicated callback mechanism could work of course
>
> 2) As Sean mentionned, and provided we redirect curl logging to our own
> callbacks instead of stderr, we could potentially just use the CPLDebug()
> infrastructure with the the callback being installed with
> CPLSetErrorHandler()
> + CPLSetCurrentErrorHandlerCatchDebug(true). We probably wouldn't want so
> much
> debugging information to be emitted by default (both because of verbosity
> and
> performance), so this should still be conditionalized by the
> CPL_CURL_VERBOSE=YES config option/env. variable
>

I'd suggest this is the best approach. Alternatively a TRACE loglevel below
DEBUG like some of the Java logging frameworks have.


>
> 3) An alternative would be to have a dedicated generic logging API
>

Not sure this adds much over our existing logging API which already
includes callbacks, and has Python integration/etc? The only thing it's
really missing are logging at different levels via topic/categories, and
even those are partially there atm (and you can make it work via a
C++/Python logging library integration).

Rob :)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20190211/289c3bac/attachment.html>


More information about the gdal-dev mailing list