QGIS API Documentation 3.41.0-Master (45a0abf3bec)
Loading...
Searching...
No Matches
Public Member Functions | List of all members
QgsScopedProjCollectingLogger Class Reference

Scoped object for temporary swapping to an error-collecting PROJ log function. More...

#include <qgsprojutils.h>

Public Member Functions

 QgsScopedProjCollectingLogger ()
 Constructor for QgsScopedProjCollectingLogger.
 
 ~QgsScopedProjCollectingLogger ()
 Returns the PROJ logger back to the default QGIS PROJ logger.
 
QStringList errors () const
 Returns the (possibly empty) list of collected errors.
 

Detailed Description

Scoped object for temporary swapping to an error-collecting PROJ log function.

Temporarily sets the PROJ log function to one which collects errors for the lifetime of the object, before returning it to the default QGIS proj logging function on destruction.

Note
The collecting logger ONLY applies to the current thread.
Not available in Python bindings
Since
QGIS 3.40

Definition at line 328 of file qgsprojutils.h.

Constructor & Destructor Documentation

◆ QgsScopedProjCollectingLogger()

QgsScopedProjCollectingLogger::QgsScopedProjCollectingLogger ( )

Constructor for QgsScopedProjCollectingLogger.

PROJ errors will be collected, and can be retrieved by calling errors().

Definition at line 616 of file qgsprojutils.cpp.

◆ ~QgsScopedProjCollectingLogger()

QgsScopedProjCollectingLogger::~QgsScopedProjCollectingLogger ( )

Returns the PROJ logger back to the default QGIS PROJ logger.

Definition at line 621 of file qgsprojutils.cpp.

Member Function Documentation

◆ errors()

QStringList QgsScopedProjCollectingLogger::errors ( ) const
inline

Returns the (possibly empty) list of collected errors.

Definition at line 347 of file qgsprojutils.h.


The documentation for this class was generated from the following files: