[Gdal-dev] Turning off error message output
Frank Warmerdam
fwarmerdam at gmail.com
Tue Jul 5 13:45:00 EDT 2005
On 6/30/05, Peng Gao <pgao at esri.com> wrote:
> On Unix, GDAL prints error messages to the console, in addition to
> error return code. Is there a way to turn off the message printout?
Peng,
You can push your own error handler using CPLPushErrorHandler().
The simplest way to disable terminal output of error messages is
to push the quiet error handler.
eg.
CPLPushErrorHandler( CPLQuietErrorHandler );
Note, that this really needs to be done for each thread using GDAL,
as currently the error handlers are thread-local information.
Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush | Geospatial Programmer for Rent
More information about the Gdal-dev
mailing list