[Qgis-developer] Macro for QgsLogger?
marco.hugentobler at karto.baug.ethz.ch
Wed Apr 5 05:53:56 EDT 2006
There is already a macro QgsDebugMsg(str) in the logger class doing this, but
not for variable/int or variable/double pairs. I could add QgsDebugMsg(str,
val), since QString::number is for int and doubles (but perhaps with ugly
formating for doubles).
Changing the output is no problem.
Am Mittwoch 05 April 2006 11:33 schrieb Martin Dobias:
> 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
> Qgis-developer mailing list
> Qgis-developer at lists.qgis.org
More information about the Qgis-developer