Browse Source

py-i2phosts-checker: add -v/--verbose option

Act as --debug, bug use 'info' loglevel
pull/1/head
Hidden Z 14 years ago
parent
commit
0e2f3c12aa
  1. 5
      py-i2phosts-checker

5
py-i2phosts-checker

@ -18,6 +18,8 @@ parser = argparse.ArgumentParser(
epilog='Report bugs to http://zzz.i2p/topics/733') epilog='Report bugs to http://zzz.i2p/topics/733')
parser.add_argument('-d', '--debug', action='store_true', parser.add_argument('-d', '--debug', action='store_true',
help='write debug messages to stdout'), 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', parser.add_argument('-c', '--config', default='/etc/py-i2phosts/checker.conf', dest='config_file',
help='config file to use') help='config file to use')
args = parser.parse_args() args = parser.parse_args()
@ -43,6 +45,9 @@ from web.lib.utils import get_logger
if args.debug == True: if args.debug == True:
log_level = 'debug' log_level = 'debug'
log_file = None log_file = None
elif args.verbose == True:
log_level = 'info'
log_file = None
else: else:
log_level = config['log_level'] log_level = config['log_level']
log_file = config['log_file'] log_file = config['log_file']

Loading…
Cancel
Save