[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[minion-cvs] Re-order log messages to be a touch saner
Update of /home/minion/cvsroot/src/minion/lib/mixminion
In directory moria.mit.edu:/tmp/cvs-serv22104/lib/mixminion
Modified Files:
ClientMain.py
Log Message:
Re-order log messages to be a touch saner
Index: ClientMain.py
===================================================================
RCS file: /home/minion/cvsroot/src/minion/lib/mixminion/ClientMain.py,v
retrieving revision 1.56
retrieving revision 1.57
diff -u -d -r1.56 -r1.57
--- ClientMain.py 13 Feb 2003 10:56:40 -0000 1.56
+++ ClientMain.py 13 Feb 2003 12:02:39 -0000 1.57
@@ -1418,7 +1418,6 @@
the message, and we don't pool it.
"""
#XXXX004 write unit tests
- LOG.info("Connecting...")
timeout = self.config['Network'].get('ConnectionTimeout')
if timeout:
timeout = timeout[2]
@@ -1428,20 +1427,29 @@
else:
handles = self.poolMessages(msgList, routingInfo)
+ if len(msgList) > 1:
+ mword = "messages"
+ else:
+ mword = "message"
+
try:
try:
# May raise TimeoutError
+ LOG.info("Connecting...")
mixminion.MMTPClient.sendMessages(routingInfo,
msgList,
timeout)
+ LOG.info("... %s sent", mword)
except:
if noPool and warnIfLost:
- LOG.error("Error with pooling disabled: message lost")
+ LOG.error("Error with pooling disabled: %s lost", mword)
elif lazyPool:
- LOG.info("Error while delivering message; message pooled")
+ LOG.info("Error while delivering %s; %s pooled",
+ mword,mword)
self.poolMessages(msgList, routingInfo)
else:
- LOG.info("Error while delivering message; leaving in pool")
+ LOG.info("Error while delivering %s; leaving in pool",
+ mword)
raise
try:
clientLock()
@@ -1478,7 +1486,6 @@
handles = [ h for _, h in messagesByServer[routing] ]
try:
self.sendMessages(msgs, routing, noPool=1, warnIfLost=0)
- LOG.info("... messages sent.")
try:
clientLock()
for h in handles: