Logger identifier for server now depends on server identifier and is not global

This commit is contained in:
nemunaire 2014-09-21 19:46:18 +02:00
parent a7830f709d
commit 314d410789
2 changed files with 2 additions and 2 deletions

View File

@ -29,6 +29,7 @@ from server.socket import SocketServer
class IRCServer(SocketServer):
def __init__(self, node, nick, owner, realname):
self.id = nick + "@" + node["host"] + ":" + node["port"]
SocketServer.__init__(self,
node["host"],
node["port"],
@ -38,7 +39,6 @@ class IRCServer(SocketServer):
self.nick = nick
self.owner = owner
self.realname = realname
self.id = nick + "@" + node["host"] + ":" + node["port"]
#Keep a list of connected channels
self.channels = dict()

View File

@ -38,7 +38,7 @@ class AbstractServer(io.IOBase):
send_callback -- Callback when developper want to send a message
"""
self.logger = logging.getLogger("nemubot.server.TODO")
self.logger = logging.getLogger("nemubot.server." + self.id)
self._sending_queue = queue.Queue()
if send_callback is not None:
self._send_callback = send_callback