mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-09-13 14:32:28 +03:00
Add --quiet option, restricting output to warnings/errors
This commit is contained in:
parent
5920d636dc
commit
37dda9414c
12 changed files with 30 additions and 6 deletions
6
fdroid
6
fdroid
|
@ -63,9 +63,15 @@ def main():
|
|||
sys.exit(1)
|
||||
|
||||
verbose = any(s in sys.argv for s in ['-v', '--verbose'])
|
||||
quiet = any(s in sys.argv for s in ['-q', '--quiet'])
|
||||
if verbose and quiet:
|
||||
print "Specifying verbose and quiet and the same time is silly"
|
||||
sys.exit(1)
|
||||
|
||||
if verbose:
|
||||
logging.basicConfig(format='%(levelname)s: %(message)s', level=logging.DEBUG)
|
||||
elif quiet:
|
||||
logging.basicConfig(format='%(levelname)s: %(message)s', level=logging.WARN)
|
||||
else:
|
||||
logging.basicConfig(format='%(message)s', level=logging.INFO)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue