Add SILENT as a module constant.

This commit is contained in:
voussoir 2021-05-08 09:00:48 -07:00
parent c34f875014
commit 14c9cb5212
No known key found for this signature in database
GPG key ID: 5F7554F8C26DACCB

View file

@ -7,6 +7,7 @@ from logging import *
_getLogger = getLogger _getLogger = getLogger
LOUD = 1 LOUD = 1
SILENT = 99999999999
def getLogger(name=None, main_fallback=None): def getLogger(name=None, main_fallback=None):
''' '''
@ -42,7 +43,7 @@ def get_level_by_argv(argv):
--loud: LOUD --loud: LOUD
--debug: DEBUG --debug: DEBUG
--quiet: ERROR --quiet: ERROR
--silent: 99999999999 --silent: SILENT
none of the above: INFO none of the above: INFO
''' '''
argv = argv[:] argv = argv[:]
@ -57,7 +58,7 @@ def get_level_by_argv(argv):
level = ERROR level = ERROR
argv.remove('--quiet') argv.remove('--quiet')
elif '--silent' in argv: elif '--silent' in argv:
level = 99999999999 level = SILENT
argv.remove('--silent') argv.remove('--silent')
else: else:
level = INFO level = INFO