[Zodb-checkins] CVS: StandaloneZODB/ZEO/zrpc - log.py:1.1.2.4
Jeremy Hylton
jeremy@zope.com
Wed, 10 Jul 2002 08:55:13 -0400
Update of /cvs-repository/StandaloneZODB/ZEO/zrpc
In directory cvs.zope.org:/tmp/cvs-serv27513/zrpc
Modified Files:
Tag: Standby-branch
log.py
Log Message:
Truncate long messages.
=== StandaloneZODB/ZEO/zrpc/log.py 1.1.2.3 => 1.1.2.4 ===
global _label
_label = "zrpc:%s" % os.getpid()
+MAX_MSG_SIZE = 1024
+
def log(message, level=zLOG.BLATHER, label=None, error=None):
+ # XXX truncate long messages for now to work around
+ # ZLogger problem.
+ if len(message) > MAX_MSG_SIZE:
+ message = message[:MAX_MSG_SIZE]
zLOG.LOG(label or _label, level, message, error=error)
REPR_LIMIT = 40