from gkeyldap.search import (LdapSearch, UID, gkey2ldap_map, gkey2SEARCH)
-# set debug level to max
-logger.setLevel(1)
+# set debug level to min
+logger.setLevel(0)
class Main(object):
@param args: list
@returns argparse.Namespace object
'''
- logger.debug('MAIN: parse_args; args: %s' % args)
+ #logger.debug('MAIN: parse_args; args: %s' % args)
actions = ['ldapsearch', 'updateseeds']
parser = argparse.ArgumentParser(
prog='gkeys',
help='The gpg fingerprint to search for')
parser.add_argument('-S', '--status', default=False,
help='The seedfile path to use')
+ parser.add_argument('-D', '--debug', default=0,
+ help='The logging level to use and report with')
return parser.parse_args(args)
logger.error("Main: run; invalid args argument passed in")
if isinstance(args, list):
args = self.parse_args(args)
+ if args.debug:
+ logger.setLevel(int(args.debug))
+ logger.debug("MAIN: run; Found alternate debug setting: %s" % str(args.debug))
if args.config:
logger.debug("Main: run; Found alternate config request: %s"
% args.config)
from gkeys.seed import Seeds
-# set debug level to max
-logger.setLevel(1)
+# set debug level to min
+logger.setLevel(0)
class Main(object):
@param args: list
@returns argparse.Namespace object
'''
- logger.debug('MAIN: parse_args; args: %s' % args)
+ #logger.debug('MAIN: parse_args; args: %s' % args)
actions = ['listseed', 'addseed', 'removeseed', 'moveseed', 'listkey',
'addkey', 'removekey', 'movekey']
parser = argparse.ArgumentParser(
help='The seeds file to use or update')
parser.add_argument('-S', '--seedfile', dest='seedfile', default=None,
help='The seedfile path to use')
+ parser.add_argument('-D', '--debug', default=0,
+ help='The logging level to use and report with')
return parser.parse_args(args)
logger.error("Main: run; invalid args argument passed in")
if isinstance(args, list):
args = self.parse_args(args)
+ if args.debug:
+ logger.setLevel(int(args.debug))
+ logger.debug("MAIN: run; Found alternate debug setting: %s" % str(args.debug))
if args.config:
logger.debug("Main: run; Found alternate config request: %s" % args.config)
self.config.defaults['config'] = args.config