[GRASS-dev] [GRASS-SVN] r53518 - grass/trunk/lib/temporal/lib
Markus Metz
markus.metz.giswork at gmail.com
Sun Oct 21 10:24:34 PDT 2012
On Sun, Oct 21, 2012 at 6:14 PM, Markus Neteler <neteler at osgeo.org> wrote:
> On Sun, Oct 21, 2012 at 3:56 PM, Martin Landa <landa.martin at gmail.com> wrote:
>> Hi,
>>
>> 2012/10/21 <svn_grass at osgeo.org>:
>>> Author: neteler
>>> Date: 2012-10-20 23:39:16 -0700 (Sat, 20 Oct 2012)
>>> New Revision: 53518
>>>
>>> Modified:
>>> grass/trunk/lib/temporal/lib/default_name.c
>>> Log:
>>> fix debug level
>> [...]
>>> - G_debug(1,
>>> + G_debug(0,
>>> "Creating new default TGIS DB params with tgis_set_default_connection()");
>>
>> debug level 0 seems to be illegal.
>
> Why this?
>
>> Either use debug '1' or change G_debug() to G_message().
>
> Then G_debug() doesn't make much sense to me.
>
> Also
>
> [neteler at north grass64]$ grep 'G_debug(0' */*/*.c
> vector/v.perturb/myrng.c: G_debug(0,"%g",numbers[i]);
> [neteler at north grass64]$ grep 'G_debug(0' */*/*/*.c
> lib/vector/Vlib/dgraph.c: G_debug(0, "exact=%d orig=%d",
> res, res2);
> vector/lidar/v.lidar.growing/ConvexHull.c: G_debug(0, "run-time error...");
> vector/lidar/v.lidar.growing/ConvexHull.c: G_debug(0, "%s", error_text);
> vector/v.lrs/v.lrs.label/main.c: G_debug(0, " line = %d / %d",
> line, nlines);
> vector/v.lrs/v.lrs.label/main.c: G_debug(0, " %d reference
> segments selected", nrseg);
>
> [neteler at north grass70]$ grep 'G_debug(0' */*/*.c
> display/d.vect/label.c: G_debug(0, "ncentroids (ogr) = %d", nlines);
> lib/gis/token.c: G_debug(0, "%d=[%s]", i, tokens[i]);
> raster3d/r3.in.ascii/main.c: G_debug(0,
> "invalid value at col=%d row=%d depth=%d last_value=[%s]",
> vector/v.lidar.growing/ConvexHull.c: G_debug(0, "run-time error...");
> vector/v.lidar.growing/ConvexHull.c: G_debug(0, "%s", error_text);
> vector/v.perturb/myrng.c: G_debug(0,"%g",numbers[i]);
>
All those G_debug(0, ...) instances are most probably leftovers from
development of the respective modules/libraries. At least I use
sometimes G_debug(0, ...) during development for debugging of
particular components because these are always printed. If everything
works fine, I change the debug level to something > 0. G_debug(0, ...)
does not belong into svn, but is a useful feature during development
with your local copy.
my 2c
Markus M
More information about the grass-dev
mailing list