Skip to content

Commit

Permalink
libpython: explain verbosity levels
Browse files Browse the repository at this point in the history
backport of 
- 71e9aba
- aeb6e8c
- 4e005c5
  • Loading branch information
neteler committed Oct 10, 2020
1 parent 2cd24d2 commit baeacb1
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions lib/python/script/core.py
Expand Up @@ -8,7 +8,7 @@
from grass.script import core as grass
grass.parser()
(C) 2008-2014 by the GRASS Development Team
(C) 2008-2020 by the GRASS Development Team
This program is free software under the GNU General Public
License (>=v2). Read the file COPYING that comes with GRASS
for details.
Expand Down Expand Up @@ -1435,7 +1435,19 @@ def overwrite():


def verbosity():
"""Return the verbosity level selected by GRASS_VERBOSE"""
"""Return the verbosity level selected by GRASS_VERBOSE
Currently, there are 5 levels of verbosity:
-1 nothing will be printed (also fatal errors and warnings will be discarded)
0 only errors and warnings are printed, triggered by "--q" or "--quiet" flag.
1 progress information (percent) and important messages will be printed
2 all messages will be printed
3 also verbose messages will be printed. Triggered by "--v" or "--verbose" flag.
"""
vbstr = os.getenv('GRASS_VERBOSE')
if vbstr:
return int(vbstr)
Expand Down

0 comments on commit baeacb1

Please sign in to comment.