[Neo-report] r2083 gregory - /trunk/neo/connection.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Fri May 7 11:13:56 CEST 2010
Author: gregory
Date: Fri May 7 11:13:54 2010
New Revision: 2083
Log:
Improve log messages.
Modified:
trunk/neo/connection.py
Modified: trunk/neo/connection.py
==============================================================================
--- trunk/neo/connection.py [iso-8859-1] (original)
+++ trunk/neo/connection.py [iso-8859-1] Fri May 7 11:13:54 2010
@@ -140,7 +140,7 @@
if klass and isinstance(packet, klass) or packet.isError():
handler.packetReceived(self._connection, packet)
else:
- logging.error('Unexpected answer: %r', packet)
+ logging.error('Unexpected answer %r in %r', packet, self._connection)
notification = Packets.Notify('Unexpected answer: %r' % packet)
self._connection.notify(notification)
self._connection.abort()
@@ -148,7 +148,8 @@
# apply a pending handler if no more answers are pending
while len(self._pending) > 1 and not self._pending[0][0]:
del self._pending[0]
- logging.debug('Apply handler %r', self._pending[0][1])
+ logging.debug('Apply handler %r on %r', self._pending[0][1],
+ self._connection)
if timeout == self._next_timeout:
# Find next timeout and its msg_id
timeout_list = []
@@ -166,11 +167,11 @@
def setHandler(self, handler):
if len(self._pending) == 1 and not self._pending[0][0]:
# nothing is pending, change immediately
- logging.debug('Set handler %r', handler)
+ logging.debug('Set handler %r on %r', handler, self._connection)
self._pending[0][1] = handler
else:
# put the next handler in queue
- logging.debug('Delay handler %r', handler)
+ logging.debug('Delay handler %r on %r', handler, self._connection)
self._pending.append([{}, handler])
More information about the Neo-report
mailing list