Hello,
I've been looking into the docs and also into the source without much luck.
When it comes to error handling, functions like GDALOpen just dump everything
to the console when reading file error or similar things occur.
Is this customizable? GDAL is deeply burried in the logic-code part of
Sam,
Is there a way to redirect it to some other buffer? Like an internal stream
which can then be properly propagated via exceptions or written into a log?
It is probably not as sophisticated as you want or need but have you tried that:
gdalinfo out.tif stdout.txt 2 stderr.txt
Regards,
I have also reported troubles of this type that unfortunately slipped
across the last two gdal releases without being addressed.
http://trac.osgeo.org/gdal/ticket/3195
Here the problem is even worst as the errors are print to stdout
Joaquim Luis
Sam,
Is there a way to redirect it
Sam,
There is CPLSetErrorHandler, which you can use to set your own error
handler function:
http://www.gdal.org/ogr/cpl__error_8h.html#74d0e649d58180e621540bf73b58e4a2
This is used for example by the HL bindings to redirect warnings and
errors to respective systems of the HLs. See: