[GRASS-dev] [GRASS-SVN] r53518 - grass/trunk/lib/temporal/lib

Martin Landa landa.martin at gmail.com
Sun Oct 21 11:10:41 PDT 2012


Hi,

2012/10/21 Markus Metz <markus.metz.giswork at gmail.com>:

> 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.

probably adding warning message to G_debug() would be meaningful(?) Eg.

Index: lib/gis/debug.c
===================================================================
--- lib/gis/debug.c     (revision 53519)
+++ lib/gis/debug.c     (working copy)
@@ -71,6 +71,10 @@
     G_init_debug();

     if (grass_debug_level >= level) {
+        if (level < 1 || level > 5)
+            G_warning(_("Invalid debug level %d. Recommended levels are 1-5."),
+                      level);
+
        va_start(ap, msg);

        filen = getenv("GRASS_DEBUG_FILE");

Martin

-- 
Martin Landa <landa.martin gmail.com> * http://geo.fsv.cvut.cz/~landa


More information about the grass-dev mailing list