[GRASS-dev] Quiet module output
johannesradinger at gmail.com
Thu Mar 21 03:18:02 PDT 2013
thank you for the hint with GRASS_VERBOSE...
toggles verbosity level
0 - only errors and warnings are printed
1 - progress messages are printed (percent complete)
2 - all module messages are printed
3 - additional verbose messages are printed
This variable is automatically created by g.parser so that the
--verbose or --quiet flags will be inherited by dependent modules as
the script runs.
What is still unclear to me: Setting the --quiet flag in a script
using g.parser (what I am doing) automatically sets the GRASS_VERBOSE
variable to 1? I'd like to get all grass_fatal(_()) error messages of
my own script but no progress message for all dependent modules in the
script (GRASS_VERBOSE=0). So how can I set the GRASS_VERBOSE to "0"
for a script so it is inherited to all underlying modules, as it seems
there is no g.parser flag provided for "0"? Therefore, is e.g.
g.gisenv set="GRASS_VERBOSE=0" before running the script or including
that line within the script the way to go?
On Wed, Mar 20, 2013 at 10:01 PM, Nikos Alexandris
<nik at nikosalexandris.net> wrote:
> On Wednesday 20 of March 2013 15:00:23 Johannes Radinger wrote:
>> I just wanted to ask how the "quiet"-flag is defined. I mean, what
>> will be still reported to the screen (console)? How is it with
>> self-written e.g. add-ons
>> in python. If "quiet" is set are all grass output messages
>> automatically suppressed?
>> What about the status report of counting percentages (0%...100%) in general?
>> If I remember correctly they are not suppressed in r.cost. That is slightly
>> annoying when running such modules in loops and the screen gets completely
>> covered with 100%s...
> you do know the related environment variables
> Check <http://grass.osgeo.org/grass64/manuals/variables.html>. Especially for
> the "VERBOSE" one, the manual states:
> "This variable is automatically created by g.parser so that the --verbose or
> --quiet flags will be inherited by dependent modules as the script runs."
> Best, Nikos
More information about the grass-dev