فهرست منبع

libpython: explain verbosity levels (#998)

* libpython: explain verbosity levels
* simplify wording

Co-authored-by: Anna Petrasova <kratochanna@gmail.com>
Markus Neteler 4 سال پیش
والد
کامیت
71e9abae5d
1فایلهای تغییر یافته به همراه9 افزوده شده و 1 حذف شده
  1. 9 1
      lib/python/script/core.py

+ 9 - 1
lib/python/script/core.py

@@ -1510,7 +1510,15 @@ def overwrite():
 
 
 
 
 def verbosity():
 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')
     vbstr = os.getenv('GRASS_VERBOSE')
     if vbstr:
     if vbstr:
         return int(vbstr)
         return int(vbstr)