[QGIS-Developer] qgis builds from release-nightly repo not built with QGISDEBUG?

Sandro Mani manisandro at gmail.com
Fri Jan 16 06:11:52 PST 2026


Hi

I'm trying to obtain debug output from qgis-server from the 
release-nighly repo (currently testing with 
1:3.44.6+git20260114+3cbba756601+40noble), which according to [1] is 
compiled as a debug build (so as I understand should have #define 
QGISDEBUG?).

I wrote a small plugin which does

QgsMessageLog.logMessage("QGIS_DEBUG: %s" % os.environ.get('QGIS_DEBUG', 
'<unset>'), 'Server Plugin "DebugTest"', Qgis.Info)
QgsMessageLog.logMessage("Level: %d" % QgsLogger.debugLevel(), 'Server 
Plugin "DebugTest"', Qgis.Info)
QgsLogger.debug("This is a debug message", 0, "debug.py", 
"onRequestReady", 18)

and then call the qgis server as

QGIS_SERVER_LOG_FILE=$PWD/qgis_server.log QGIS_LOG_FILE=$PWD/qgis.log 
QGIS_PROJECT_FILE=$PWD/test.qgs 
QUERY_STRING="SERVICE=WMS&REQUEST=GetCapabilities" 
/usr/lib/cgi-bin/qgis_mapserv.fcgi

The relevant output is in qgis_server.log

13:52:41 INFO Server Plugin "DebugTest"[558]: QGIS_DEBUG: <unset>
13:52:41 INFO Server Plugin "DebugTest"[558]: Level: 0

while qgis.log is empty. If I manually set QGIS_DEBUG=1, qgis.log will 
contain

debug.py:18 : (onRequestReady) [3ms] This is a debug message

So it looks like the release-nighly builds are in fact not compiled with 
QGISDEBUG, and all QgsDebug macros [2] are compiled as stubs? Are the 
build logs of the release-nighly repo visible somewhere?

Thanks!
Sandro

[1] https://qgis.org/resources/installation-guide/#debian--ubuntu
[2] 
https://github.com/qgis/QGIS/blob/fb066c580586d9a01aeec95276a279a2adb686ad/src/core/qgslogger.h#L32
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20260116/3a9ee656/attachment.htm>


More information about the QGIS-Developer mailing list