[Qgis-developer] prints to std::cout in qgis

Radim Blazek radim.blazek at gmail.com
Wed Mar 22 12:02:54 EST 2006


On 3/22/06, Mateusz Łoskot <mateusz at loskot.net> wrote:
> > I would prefere to control debug with enviroment variables. It can
> > include also file specification. E.g. export QGIS_DEBUG=5 export
> > QGIS_DEBUG_FILE=Envelope.cpp
>
> OK, I can imagine how QGIS_DEBUG variable is used.
> The value of QGIS_DEBUG controls significance of messages sent to output.
>
> But how the second macro should work?
> Do you expect that everytime and everywhere debug output API is used, it
> reads for QGIS_DEBUG_FILE and checks if it contains current file.
> If it does, then debug output is turned on for this file.
> Right?
>
> Basic example:
>
> GEOS_DEBUG_PRINT("this is my debug message")
>
> This macro is expanded to something like following operations:
>
> Now, when QGIS is executed, macro checks:
> - is there any QGIS_DEBUG_FILE deined?
> - if there is, check if it contains file with name of current
>    file; here __FILE__ can be used
> - if current file is there, print debug message, if not, just ignore it.
>
> Is this your idea?

Yes.

Radim

> Cheers
> --
> Mateusz Łoskot
> http://mateusz.loskot.net
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.qgis.org
> http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-developer
>


More information about the Qgis-developer mailing list