changeset 3612:6f06c7d051a4

Setting a more meaningful logger name.
author Karol 'grzywacz' Nowak <grywacz@gmail.com>
date Sat, 17 May 2008 22:29:44 +0200
parents 0b220c040be4
children 42363c0d9fc4
files jabberbot/bot.py jabberbot/i18n.py jabberbot/xmlrpcbot.py jabberbot/xmppbot.py
diffstat 4 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/jabberbot/bot.py	Sat May 17 22:11:05 2008 +0200
+++ b/jabberbot/bot.py	Sat May 17 22:29:44 2008 +0200
@@ -50,7 +50,7 @@
 
         raise SystemExit
 
-    log = logging.getLogger("log")
+    log = logging.getLogger(__name__)
     log.setLevel(logging.DEBUG)
     log.addHandler(logging.StreamHandler())
 
--- a/jabberbot/i18n.py	Sat May 17 22:11:05 2008 +0200
+++ b/jabberbot/i18n.py	Sat May 17 22:29:44 2008 +0200
@@ -47,7 +47,7 @@
     """
 
     wiki = xmlrpclib.Server(config.wiki_url + "?action=xmlrpc2")
-    log = logging.getLogger("log")
+    log = logging.getLogger(__name__)
     log.debug("Initialising i18n...")
 
     try:
--- a/jabberbot/xmlrpcbot.py	Sat May 17 22:11:05 2008 +0200
+++ b/jabberbot/xmlrpcbot.py	Sat May 17 22:29:44 2008 +0200
@@ -81,7 +81,7 @@
 
         """
         Thread.__init__(self)
-        self.log = logging.getLogger("log")
+        self.log = logging.getLogger(__name__)
 
         if not config.secret:
             error = "You must set a (long) secret string!"
@@ -310,7 +310,7 @@
         Thread.__init__(self)
         self.commands = commands
         self.verbose = config.verbose
-        self.log = logging.getLogger("log")
+        self.log = logging.getLogger(__name__)
         self.config = config
 
         if config.secret:
--- a/jabberbot/xmppbot.py	Sat May 17 22:11:05 2008 +0200
+++ b/jabberbot/xmppbot.py	Sat May 17 22:29:44 2008 +0200
@@ -180,7 +180,7 @@
         jid = u"%s@%s/%s" % (config.xmpp_node, config.xmpp_server, config.xmpp_resource)
 
         self.config = config
-        self.log = logging.getLogger("log")
+        self.log = logging.getLogger(__name__)
         self.jid = JID(node_or_jid=jid, domain=config.xmpp_server, resource=config.xmpp_resource)
         self.tlsconfig = TLSSettings(require = True, verify_peer=False)