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:56 +0000 (UTC) [thread overview]
Message-ID: <1371961859.11795d9e10e11000dbf36397f4870fed5635bdc8.dol-sen@gentoo> (raw)
commit: 11795d9e10e11000dbf36397f4870fed5635bdc8
Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Sat Jun 22 19:41:31 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=11795d9e
Make the logger, namespace able.
---
gkeyldap/cli.py | 3 +++
gkeys/cli.py | 3 +++
gkeys/log.py | 12 +++++++++++-
3 files changed, 17 insertions(+), 1 deletion(-)
diff --git a/gkeyldap/cli.py b/gkeyldap/cli.py
index 21e551f..8d9dc85 100644
--- a/gkeyldap/cli.py
+++ b/gkeyldap/cli.py
@@ -7,7 +7,10 @@ import sys
import os
import argparse
+from gkeys import log
+log.set_logger('gkeyldap')
from gkeys.log import logger
+
from gkeys.config import GKeysConfig, GKEY
from gkeys.seed import Seeds
from gkeyldap.search import (LdapSearch, UID, gkey2ldap_map, gkey2SEARCH)
diff --git a/gkeys/cli.py b/gkeys/cli.py
index b9846d9..47c8777 100644
--- a/gkeys/cli.py
+++ b/gkeys/cli.py
@@ -16,7 +16,10 @@ from __future__ import print_function
import argparse
import sys
+from gkeys import log
+log.set_logger('gkeys')
from gkeys.log import logger
+
from gkeys.config import GKeysConfig, GKEY
from gkeys.seed import Seeds
diff --git a/gkeys/log.py b/gkeys/log.py
index c0a33e7..4608eba 100644
--- a/gkeys/log.py
+++ b/gkeys/log.py
@@ -14,5 +14,15 @@ import logging
logging.basicConfig()
-logger = logging.getLogger('gentoo-keys')
+NAMESPACE = 'gentoo-keys'
+logger = None
+
+def set_logger(namespace=None):
+ global logger, NAMESPACE
+ if not namespace:
+ namespace = Namespace
+ else:
+ NAMESPACE = namespace
+ logger = logging.getLogger(namespace)
+
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.11795d9e10e11000dbf36397f4870fed5635bdc8.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