[Zodb-checkins] CVS: ZODB3/ZEO/zrpc - connection.py:1.4
Jeremy Hylton
jeremy@zope.com
Fri, 26 Jul 2002 16:54:48 -0400
Update of /cvs-repository/ZODB3/ZEO/zrpc
In directory cvs.zope.org:/tmp/cvs-serv2865/zrpc
Modified Files:
connection.py
Log Message:
Use short_repr() for log at BLATHER level for method invocation.
I think this is the log call that has been killing backends by sending
very large strings.
=== ZODB3/ZEO/zrpc/connection.py 1.3 => 1.4 ===
def handle_reply(self, msgid, flags, args):
if __debug__:
- log("recv reply: %s, %s, %s" % (msgid, flags, str(args)[:40]),
+ log("recv reply: %s, %s, %s" % (msgid, flags, short_repr(args)),
level=zLOG.DEBUG)
self.__reply = msgid, flags, args
self.__reply_lock.release() # will fail if lock is unlocked
@@ -162,14 +162,15 @@
msg = "Invalid method name: %s on %s" % (name, repr(self.obj))
raise ZRPCError(msg)
if __debug__:
- log("%s%s" % (name, args), level=zLOG.BLATHER)
+ log("%s%s" % (name, short_repr(args)), level=zLOG.BLATHER)
meth = getattr(self.obj, name)
try:
ret = meth(*args)
except Exception, msg:
error = sys.exc_info()[:2]
- log("%s() raised exception: %s" % (name, msg), zLOG.ERROR, error=sys.exc_info())
+ log("%s() raised exception: %s" % (name, msg),
+ zLOG.ERROR, error=sys.exc_info())
return self.return_error(msgid, flags, error[0], error[1])
if flags & ASYNC: