[GRASS-dev] added granularity in GRASS_VERBOSE

Hamish hamish_nospam at yahoo.com
Thu Oct 26 03:21:47 EDT 2006


Hi,

with the current G_verbose() there is no verbosity level above the
default without getting into debug messages*. (no --very-verbose)

Looking to replace -v verbose flags, there's nowhere to go.

Can we change lib/gis/verbose.c  MAXLEVEL to 3? or 5 to match G_debug()
as suggested on the list?


Hamish

* G_debug() is still mostly broken for me in 6.3! (they don't display)
-------------- next part --------------
Index: verbose.c
===================================================================
RCS file: /home/grass/grassrepository/grass6/lib/gis/verbose.c,v
retrieving revision 2.4
diff -u -r2.4 verbose.c
--- verbose.c	10 Oct 2006 09:50:45 -0000	2.4
+++ verbose.c	26 Oct 2006 07:19:47 -0000
@@ -18,7 +18,8 @@
 #include <grass/config.h>
 #include <stdlib.h>
 
-#define MAXLEVEL 2 
+#define MAXLEVEL 3
+#define STDLEVEL 2
 #define MINLEVEL 0
 
 
@@ -32,6 +33,8 @@
  * \param 0 - module should print nothing but errors and warnings (G_fatal_error, G_warning)
  * \param 1 - module will print progress information (G_percent)
  * \param 2 - module will print all messages (G_message)
+ * \param 3 - module will be very verbose. Triggered by "--v".
+ *            "--v" requires if(G_verbose() == G_verbose_max()) tests.
  */
 int G_verbose (void)
 
@@ -46,7 +49,7 @@
                 ;
         }
         else
-            verbose = MAXLEVEL;
+            verbose = STDLEVEL;
     }
     return verbose;
 }


More information about the grass-dev mailing list