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

Mateusz Łoskot mateusz at loskot.net
Mon Apr 3 11:28:14 EDT 2006


Tim Sutton wrote:
> Hi Marco
> 
> I think it would be interesting to combine the logger functions with
>  the unit tests I am planning. So for example a unit test may achieve
>  a result but produce critical errors / warnings (Im assuming if its
>  fatal, the unit test would fail). With this in mind it would be 
> interesting to propoage __FILE__ and __LINE__ into the logs. I was 
> also wondering if a simple xml format (or delimited text for xml 
> haters) could be produced by the logger e.g.
> 
> xml:
> 
> <Message file="qgisapp.cpp" line="1232" severity="critical"> QGIS has
>  detected a wobble in the earths orbit </Message>
> 
> or:
> 
> File               Line    Severity  Message qgisapp.cpp   1232 
> Critical    QGIS has detected a wobble in the earths orbit etc.

It could be nice to have possibility to create 1-3 test reporter for
different output.
This is how Unit Tests work in GEOS.
Test reporter is very very simple code, that just grabs output from
Unit Test runner. Reporter catches callbacks/signals from test runner.

Cheers
-- 
Mateusz Łoskot
http://mateusz.loskot.net



More information about the Qgis-developer mailing list