[GRASS-dev] r.mapcalc and g.remove --v/q issues

Hamish hamish_nospam at yahoo.com
Sun Oct 8 08:04:14 EDT 2006

Maciej Sieczka wrote:

> >> Propably due to the recent work on --v and --q flags (great stuff,
> >> many thanks to the authors!), r.mapcalc doesn't print any progress
> >> indicator anymore.
> > AFAIK, modules are quiet by default now. If you want verbosity (e.g.
> > progress indication) you have to enable it.
> I didn't realize that quiet mode implies no progress indicator. In
> that case verbose should be the default IMO, because we can't leave
> users without a feedback from the module progress unless they
> implicitely requests that. Am I wrong?

(not sure if I fully understand the current mode, sorry I haven't been
following this thread, but from observation, ...)

I think it is wrong to make all modules --quiet be default. Many years
of tuning have gone into the current message level, we just throw that
out? Sure some modules are very noisy and that should be dealt with
(remove useless noise and move debug info to G_debug()).

IMO the "only create output if something interesting happens"
guideline should only apply to UNIX-like small "do one thing well"
modules. Quick little modules used in a script (ie in a loop) can be
made a bit quieter, sure.

But for long running modules like v.surf.rst and r.sun, we should
definitely let the user know what's going on, what mode the module is
running in, how many points used for processing, etc. Anything which is
expected to take longer than about 10 seconds under normal conditions
should at least give G_percent() output IMO.

This is especially important for new users who are not confident or
knowledgeable about what is going on or how long it will take.

Hiding all G_message() and G_percent() output *by default* is totally
nuts. Adding --quiet or GRASS_VERBOSE=0 isn't hard if you are writing a
script or GUI frontend.

It's great to have the fine grained control, but I suggest this change:

Index: verbose.c
RCS file: /home/grass/grassrepository/grass6/lib/gis/verbose.c,v
retrieving revision 2.3
diff -u -r2.3 verbose.c
--- verbose.c   25 Sep 2006 09:43:09 -0000      2.3
+++ verbose.c   8 Oct 2006 11:52:26 -0000
@@ -46,7 +46,7 @@
-            verbose = MINLEVEL;
+            verbose = MAXLEVEL;
     return verbose;


ps -
in verbose.c, is this test correct?

static int verbose;
G_verbose() {
    /* verbose not defined -> get it from env. */
    if ( !verbose ) {

so it gets read from GRASS_VERBOSE not only if its unset but also if
it happens to be at MINLEVEL?

More information about the grass-dev mailing list