[GRASS-dev] making grass modules less verbose

Glynn Clements glynn at gclements.plus.com
Wed Sep 20 16:30:55 EDT 2006


Jachym Cepicky wrote:

> I fully agree with you. But how to do this the best way? Add new
> parameter to the function? 
> 
> e.g.
> 
>     G_percent(row,nrows,2,module)
> 
>     so that 
> 
>     G_percent could call G_percent2(n,d,s,stderr,module->verbose)
> 
> Make G_percent(), G_debug() and G_message() read environment variable
> GRASS_VERBOSE? I would say, this would be the best solution.

Add a function to query the verbosity level, and change G_percent()
etc to use it.

If there's a GRASS_VERBOSE environment variable, you probably want
both --verbose and --quiet (the latter would disable verbosity even
when GRASS_VERBOSE is set).

-- 
Glynn Clements <glynn at gclements.plus.com>




More information about the grass-dev mailing list