From 0e2f3c12aa80964f36e1fc25f492f9abe20caf54 Mon Sep 17 00:00:00 2001 From: Hidden Z Date: Sat, 30 Oct 2010 21:54:23 +0000 Subject: [PATCH] py-i2phosts-checker: add -v/--verbose option Act as --debug, bug use 'info' loglevel --- py-i2phosts-checker | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/py-i2phosts-checker b/py-i2phosts-checker index fd926b9..e6897ea 100755 --- a/py-i2phosts-checker +++ b/py-i2phosts-checker @@ -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']