[QGIS-Developer] Understanding the QgsLogger levels

Thomas Larsen Wessel mrvelle at gmail.com
Sat Jan 20 08:12:05 PST 2024


Studying: https://qgis.org/pyqgis/master/core/QgsLogger.html

There seems to be four levels. And if their values are taken from Qt, their
values are as listed below:
- debug 0
- warning 1
- critical 2
- fatal 3

Is this correct?

The page says: "*If the debug level of a message is <= QGIS_DEBUG, the
message is written to the console. *"

If that is true, that is not a very meaningful behavior. When would anyone
want to have all debug and warning messages logged, but not critical and
fatal messages? And conversely, if one wants only the messages above some
criticality threshold, that is not possible.

Or have I misunderstood?

/Thomas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20240120/c4507190/attachment.htm>


More information about the QGIS-Developer mailing list