Hi all, On Sat, 9 Feb 2019 at 00:59, Even Rouault <even.roua...@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 :)
_______________________________________________ gdal-dev mailing list gdal-dev@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/gdal-dev