[Qgis-developer] QGIS server (broken?) logging

Jürgen E. Fischer jef at norbit.de
Thu Mar 5 03:22:15 PST 2015


Hi Alessandro,

On Wed, 04. Mar 2015 at 21:38:44 +0100, Alessandro Pasotti wrote:
> I cannot understand the reasons for some parts of the current
> implementation, for example: can someone shed some light about the
> purpose of the (unused) QgsServerLogger class? Why QgsMessageLog
> doesn't work inside the FCGI loop (but works from the command line)?

QgsMessageLog needs listeners to its signal.   This can be QgsMessageLogViewer
(like in desktop) or QgsMessageLogConsole.

It was changed in a3452a5 - before it didn't use signals (which broke when
threads were used) and would automatically log to the console when no logger
was registered.

Now you need to explicitly instantiate a QgsMessageLogConsole object and it'll
automatically connect to the signal and log to the console.

QgsDebugMsg is something else.  It's only included in debug builds (using
-DQGISDEBUG), in release builds it's a noop.


Jürgen

-- 
Jürgen E. Fischer           norBIT GmbH             Tel. +49-4931-918175-31
Dipl.-Inf. (FH)             Rheinstraße 13          Fax. +49-4931-918175-50
Software Engineer           D-26506 Norden             http://www.norbit.de
QGIS release manager (PSC)  Germany                    IRC: jef on FreeNode                         
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 827 bytes
Desc: Digital signature
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20150305/e2c27c3e/attachment.pgp>


More information about the Qgis-developer mailing list