Add SILENT as a module constant.
This commit is contained in:
parent
c34f875014
commit
14c9cb5212
1 changed files with 3 additions and 2 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue