mirror of
https://github.com/r4sas/py-i2phosts
synced 2025-02-02 01:44:40 +00:00
py-i2phosts-checker: add -v/--verbose option
Act as --debug, bug use 'info' loglevel
This commit is contained in:
parent
1574c1d13f
commit
0e2f3c12aa
@ -18,6 +18,8 @@ parser = argparse.ArgumentParser(
|
||||
epilog='Report bugs to http://zzz.i2p/topics/733')
|
||||
parser.add_argument('-d', '--debug', action='store_true',
|
||||
help='write debug messages to stdout'),
|
||||
parser.add_argument('-v', '--verbose', action='store_true',
|
||||
help='set loglevel to info and write messages to stdout'),
|
||||
parser.add_argument('-c', '--config', default='/etc/py-i2phosts/checker.conf', dest='config_file',
|
||||
help='config file to use')
|
||||
args = parser.parse_args()
|
||||
@ -43,6 +45,9 @@ from web.lib.utils import get_logger
|
||||
if args.debug == True:
|
||||
log_level = 'debug'
|
||||
log_file = None
|
||||
elif args.verbose == True:
|
||||
log_level = 'info'
|
||||
log_file = None
|
||||
else:
|
||||
log_level = config['log_level']
|
||||
log_file = config['log_file']
|
||||
|
Loading…
x
Reference in New Issue
Block a user