[Qgis-developer] Macro for QgsLogger?

Martin Dobias wonder.sk at gmail.com
Wed Apr 5 05:33:05 EDT 2006


Hi,

I just have a question - isn't it possible to use a macro for
QgsLogger::debug call which would automatically add __FILE__,
__FUNCTION__ and __LINE__ parameters? It would save some typing, e.g.
instead of using

QgsLogger::debug("c3", (int) mDiscrete[i].c3, 2, __FILE__,
__FUNCTION__,  __LINE__);

use something like

QgsLogger_debug("c3", (int) mDiscrete[i].c3, 2);



And by the way, could be QgsLogger output a bit less verbose?

This is how does it look like now:

Debug: File: qgsogrprovider.cpp, Function: getNextFeature, Line: 532,
Message: Testing geometry using mbr


I would prefer something similar to output from gcc:

qgsogrprovider.cpp:532: (getNewFeature) Testing geometry using mbr



Bye,
Martin



More information about the Qgis-developer mailing list