[QGIS-Developer] QgsLogger in standalone app

David Marteau dmarteau at 3liz.com
Wed Oct 16 04:49:06 PDT 2019

Yes, you have to connect a hook to the messageReceived slot: see https://github.com/3liz/py-qgis-server/blob/master/pyqgisserver/utils/qgis.py#L106 <https://github.com/3liz/py-qgis-server/blob/master/pyqgisserver/utils/qgis.py#L106> for an example.

> Le 16 oct. 2019 à 09:38, VOLPES-EXT, Jacky <Jacky.VOLPES-EXT at canal-de-provence.com> a écrit :
> Hi,
> Is it possible to get the output of QgsLogger from a pyqgis standalone app ?
> I would like to have the warnings and everything sent by QgsLogger in my console while running the app, but when I set the environment variable QGIS_DEBUG to 1, 2, or 3 nothing is printed on the console, although I’m sure that a message should be printed (a layer form not found).
> If I instanciate a QgsLogger in my pyqgis app it works, but I want to see messages from QgisApplication logger (C++).
> Thanks, 
> BR
> Jacky Volpes
> HR Team pour la Société du Canal de Provence | 2SI - QGIS
> Le Tholonet, CS70064
> jacky.volpes-ext at canal-de-provence.com <mailto:jacky.volpes-ext at canal-de-provence.com>
> _______________________________________________
> QGIS-Developer mailing list
> QGIS-Developer at lists.osgeo.org <mailto:QGIS-Developer at lists.osgeo.org>
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer <https://lists.osgeo.org/mailman/listinfo/qgis-developer>
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer <https://lists.osgeo.org/mailman/listinfo/qgis-developer>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20191016/9a564f58/attachment.html>

More information about the QGIS-Developer mailing list