[GRASS-dev] making grass modules less verbose

Paul Kelly paul-grass at stjohnspoint.co.uk
Wed Sep 20 06:52:13 EDT 2006


Hello Jachym
In order to keep module output as consistent as possible, I feel it might 
be better to implement this as a "quiet" flag rather than a verbose flag? 
I.e. by default output continues as normal but if, as you say the modules 
need to be used in something like an emebedded system with minimal output 
then the quiet flag could be specified.

I was thinking also it would be a good test for which modules write 
directly to stderr and which should possibly be changed to use 
G_message(), if you set the quiet flag before running them. Although 
G_message() doesn't offer as much flexibility as printing to stderr,
e.g. no backspace or bell.

Paul

On Wed, 20 Sep 2006, Jachym Cepicky wrote:

> On Wed, Sep 20, 2006 at 09:37:36AM +0200, Sören Gebbert wrote:
>> Hi,
>> i think this is a nice idea.
>> Some modules are very verbose and with this approach a general
>> way is provided to handle this verbosity.
>>
>> Best regards
>> Soeren
>>
>
> I prepared new patch (for current cvs version) which makes all modules
> be able to use --verbose flag or to set GRASS_VERBOSE env. variable.
>
> G_message, G_warning and G_percent are now able to handle according to
> the user needs.
>
> Could anybody test this?
>
> If this works well and nobody has any objection, I would implement the log file idea.
>
> The hard part will be go throu all modules and replace (f)printf for
> G_message(), but I could take care on this. Another thing: parts of g.* and v.* modules do not use G_message at all.
>
> Jachym
>
> -- 
> Jachym Cepicky
> e-mail: jachym.cepicky at centrum.cz
> URL: http://les-ejk.cz
> GPG: http://les-ejk.cz/gnupg_public_key/jachym_cepicky-gpg_public_key.asc
> -----------------------------------------
> OFFICE:
> GDF-Hannover
> Mengendamm 16d
> 30177 Hannover
> Germany
> e-mail: cepicky at gdf-hannover.de
> URL:    http://gdf-hannover.de
> Tel.:   +49 511-39088507
>


More information about the grass-dev mailing list