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

Martin Landa landa.martin at gmail.com
Sun Oct 8 09:59:26 EDT 2006


... I meant that all G_percent () and G_message () output should be
printed by default (in the current verbose implementation it is
MAXLEVEL).

 * Currently, there are 3 levels of verbosity:
 * \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)


Martin

2006/10/8, Martin Landa <landa.martin at gmail.com>:
> Hi,
>
> I agree, default verbose level should be set to MAXLEVEL (--v) ...
>
> Martin
>
> 2006/10/8, Hamish <hamish_nospam at yahoo.com>:
> > 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 @@
> >                  ;
> >          }
> >          else
> > -            verbose = MINLEVEL;
> > +            verbose = MAXLEVEL;
> >      }
> >      return verbose;
> >  }
> >
> >
> >
> > 2c,
> > Hamish
> >
> >
> > 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?
> >
> > _______________________________________________
> > grass-dev mailing list
> > grass-dev at grass.itc.it
> > http://grass.itc.it/mailman/listinfo/grass-dev
> >
>
>
> --
> Martin Landa <landa.martin at gmail.com> * http://gama.fsv.cvut.cz/~landa *
>


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




More information about the grass-dev mailing list