Re: [QGIS-Developer] QgsLogger in standalone app

2019-10-16 Thread David Marteau

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
 

 for an example.

> Le 16 oct. 2019 à 09:38, VOLPES-EXT, Jacky 
>  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-...@canal-de-provence.com 
> 
>  
> ___
> QGIS-Developer mailing list
> QGIS-Developer@lists.osgeo.org 
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer 
> 
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer 
> 
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

[QGIS-Developer] QgsLogger in standalone app

2019-10-16 Thread VOLPES-EXT, Jacky
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-...@canal-de-provence.com

___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer