[Zodb-checkins] CVS: ZODB3/zLOG - MinimalLogger.py:1.16
Guido van Rossum
guido@python.org
Mon, 16 Sep 2002 10:08:52 -0400
Update of /cvs-repository/ZODB3/zLOG
In directory cvs.zope.org:/tmp/cvs-serv13293
Modified Files:
MinimalLogger.py
Log Message:
Change wrap width to 79. Suppress blank line after tracebacks.
=== ZODB3/zLOG/MinimalLogger.py 1.15 => 1.16 ===
--- ZODB3/zLOG/MinimalLogger.py:1.15 Sat Sep 14 15:25:11 2002
+++ ZODB3/zLOG/MinimalLogger.py Mon Sep 16 10:08:51 2002
@@ -86,7 +86,7 @@
if not textwrap or len(line) < 80:
buf.append(line)
else:
- buf.extend(textwrap.wrap(line, subsequent_indent=" "*20))
+ buf.extend(textwrap.wrap(line, width=79, subsequent_indent=" "*20))
if detail:
buf.append(str(detail))
@@ -99,7 +99,8 @@
except '':
buf.append("%s: %s" % error[:2])
- buf.append("") # Cause a final \n to be appended
+ if buf[-1] and buf[-1][-1] != "\n":
+ buf.append("") # Cause a final \n to be appended
_log_dest.write("\n".join(buf))
_log_dest.flush()