From: "Brian Dolbec" <brian.dolbec@gmail.com>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/gentoo-keys:master commit in: gkeyldap/, gkeys/
Date: Sun, 23 Jun 2013 07:13:57 +0000 (UTC) [thread overview]
Message-ID: <1371961859.7cce980577bdb9f88337f52f1e488796964361b4.dol-sen@gentoo> (raw)
commit: 7cce980577bdb9f88337f52f1e488796964361b4
Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Sat Jun 22 20:20:43 2013 +0000
Commit: Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Sun Jun 23 04:30:59 2013 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/gentoo-keys.git;a=commit;h=7cce9805
Add -D, --debug level to cli
Comment out a parse_argrs logger line, move the debug reassignment to after it's setting.
---
gkeyldap/cli.py | 11 ++++++++---
gkeys/cli.py | 11 ++++++++---
2 files changed, 16 insertions(+), 6 deletions(-)
diff --git a/gkeyldap/cli.py b/gkeyldap/cli.py
index ba0218b..b506f64 100644
--- a/gkeyldap/cli.py
+++ b/gkeyldap/cli.py
@@ -16,8 +16,8 @@ from gkeys.seed import Seeds
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):
@@ -49,7 +49,7 @@ 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',
@@ -76,6 +76,8 @@ class Main(object):
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)
@@ -89,6 +91,9 @@ class Main(object):
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)
diff --git a/gkeys/cli.py b/gkeys/cli.py
index 47c8777..743b622 100644
--- a/gkeys/cli.py
+++ b/gkeys/cli.py
@@ -24,8 +24,8 @@ from gkeys.config import GKeysConfig, GKEY
from gkeys.seed import Seeds
-# set debug level to max
-logger.setLevel(1)
+# set debug level to min
+logger.setLevel(0)
class Main(object):
@@ -56,7 +56,7 @@ 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(
@@ -90,6 +90,8 @@ class Main(object):
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)
@@ -103,6 +105,9 @@ class Main(object):
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
next reply other threads:[~2013-06-23 7:14 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-23 7:13 Brian Dolbec [this message]
-- strict thread matches above, loose matches on Subject: below --
2014-05-27 20:56 [gentoo-commits] proj/gentoo-keys:master commit in: gkeyldap/, gkeys/ Brian Dolbec
2014-05-27 20:56 Brian Dolbec
2014-05-27 20:56 Brian Dolbec
2014-05-27 20:56 Brian Dolbec
2014-05-27 20:56 Brian Dolbec
2014-03-01 17:49 Pavlos Ratis
2013-11-17 7:39 Brian Dolbec
2013-11-15 9:16 Brian Dolbec
2013-11-15 9:16 Brian Dolbec
2013-11-10 1:01 Brian Dolbec
2013-06-23 7:13 Brian Dolbec
2013-06-23 7:13 Brian Dolbec
2013-06-23 7:13 Brian Dolbec
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1371961859.7cce980577bdb9f88337f52f1e488796964361b4.dol-sen@gentoo \
--to=brian.dolbec@gmail.com \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox