Commit 70dcd0fb authored by Grégory Wisniewski's avatar Grégory Wisniewski

Clean and unify information messages.

git-svn-id: https://svn.erp5.org/repos/neo/trunk@1964 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent 00f80e64
...@@ -65,9 +65,10 @@ class Application(object): ...@@ -65,9 +65,10 @@ class Application(object):
if partitions <= 0: if partitions <= 0:
raise RuntimeError, 'partitions must be more than zero' raise RuntimeError, 'partitions must be more than zero'
self.pt = PartitionTable(partitions, replicas) self.pt = PartitionTable(partitions, replicas)
logging.debug('the number of replicas is %d, the number of ' \ logging.info('Configuration:')
'partitions is %d, the name is %s', logging.info('Partitions: %d', partitions)
replicas, partitions, self.name) logging.info('Replicas : %d', replicas)
logging.info('Name : %s', self.name)
self.listening_conn = None self.listening_conn = None
self.primary = None self.primary = None
......
...@@ -105,9 +105,12 @@ class Application(object): ...@@ -105,9 +105,12 @@ class Application(object):
elif name != self.name: elif name != self.name:
raise RuntimeError('name does not match with the database') raise RuntimeError('name does not match with the database')
ptid = dm.getPTID() ptid = dm.getPTID()
logging.info("Configuration: uuid=%s, ptid=%s, name=%s, np=%s, nr=%s" \ logging.info('Configuration loaded:')
% (dump(self.uuid), dump(ptid), name, num_partitions, logging.info('UUID : %s', dump(self.uuid))
num_replicas)) logging.info('PTID : %s', dump(ptid))
logging.info('Name : %s', name)
logging.info('Partitions: %s', num_partitions)
logging.info('Replicas : %s', num_replicas)
def loadPartitionTable(self): def loadPartitionTable(self):
"""Load a partition table from the database.""" """Load a partition table from the database."""
......
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