Commit 0f30732c authored by Grégory Wisniewski's avatar Grégory Wisniewski

Minor changes with log messages and UUIDs.


git-svn-id: https://svn.erp5.org/repos/neo/branches/prototype3@431 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent c1b3044a
......@@ -163,7 +163,8 @@ class Connection(BaseConnection):
"""Close the connection."""
em = self.em
if self.connector is not None:
logging.debug('closing a connector for %s:%d', *(self.addr))
logging.debug('closing a connector for %s (%s:%d)',
dump(self.uuid), *(self.addr))
em.removeReader(self)
em.removeWriter(self)
em.unregister(self)
......@@ -179,7 +180,8 @@ class Connection(BaseConnection):
def abort(self):
"""Abort dealing with this connection."""
logging.debug('aborting a connetor for %s:%d', *(self.addr))
logging.debug('aborting a connector for %s (%s:%d)',
dump(self.uuid), *(self.addr))
self.aborted = True
def writable(self):
......
......@@ -702,7 +702,8 @@ class Application(object):
return
def playPrimaryRole(self):
logging.info('play the primary role')
logging.info('play the primary role with %s (%s:%d)',
dump(self.uuid), *(self.server))
# If I know any storage node, make sure that they are not in the running state,
# because they are not connected at this stage.
......@@ -724,7 +725,8 @@ class Application(object):
def playSecondaryRole(self):
"""I play a secondary role, thus only wait for a primary master to fail."""
logging.info('play the secondary role')
logging.info('play the secondary role with %s (%s:%d)',
dump(self.uuid), *(self.server))
handler = SecondaryEventHandler(self)
em = self.em
......
......@@ -81,7 +81,7 @@ class Node(object):
else:
address, port = server
uuid = self.getUUID()
return '%r:%r (%s)' % (address, port, dump(uuid))
return '%s (%s:%s)' % (dump(uuid), address, port)
class MasterNode(Node):
"""This class represents a master node."""
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment