From baeacb18816d318f03ddbc628f619722c5e006d0 Mon Sep 17 00:00:00 2001 From: Markus Neteler Date: Sat, 10 Oct 2020 18:53:01 +0200 Subject: [PATCH] libpython: explain verbosity levels backport of - 71e9abae5d897fe88dc25e5f9f5a4a81c580da62 - aeb6e8cadaa6be9e219ed9101ea57032afb4d0f5 - 4e005c5b1b55c69c23a6e7632bd21249623b6677 --- lib/python/script/core.py | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/lib/python/script/core.py b/lib/python/script/core.py index 31d9d6d60ac..b93e8b53cb2 100644 --- a/lib/python/script/core.py +++ b/lib/python/script/core.py @@ -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. @@ -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)