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): ...@@ -163,7 +163,8 @@ class Connection(BaseConnection):
"""Close the connection.""" """Close the connection."""
em = self.em em = self.em
if self.connector is not None: 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.removeReader(self)
em.removeWriter(self) em.removeWriter(self)
em.unregister(self) em.unregister(self)
...@@ -179,7 +180,8 @@ class Connection(BaseConnection): ...@@ -179,7 +180,8 @@ class Connection(BaseConnection):
def abort(self): def abort(self):
"""Abort dealing with this connection.""" """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 self.aborted = True
def writable(self): def writable(self):
......
...@@ -702,7 +702,8 @@ class Application(object): ...@@ -702,7 +702,8 @@ class Application(object):
return return
def playPrimaryRole(self): 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, # If I know any storage node, make sure that they are not in the running state,
# because they are not connected at this stage. # because they are not connected at this stage.
...@@ -724,7 +725,8 @@ class Application(object): ...@@ -724,7 +725,8 @@ class Application(object):
def playSecondaryRole(self): def playSecondaryRole(self):
"""I play a secondary role, thus only wait for a primary master to fail.""" """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) handler = SecondaryEventHandler(self)
em = self.em em = self.em
......
...@@ -81,7 +81,7 @@ class Node(object): ...@@ -81,7 +81,7 @@ class Node(object):
else: else:
address, port = server address, port = server
uuid = self.getUUID() uuid = self.getUUID()
return '%r:%r (%s)' % (address, port, dump(uuid)) return '%s (%s:%s)' % (dump(uuid), address, port)
class MasterNode(Node): class MasterNode(Node):
"""This class represents a master 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