SF patch #761519: Fixes for bugs 760703 and 757821

SF bug #760703: SocketHandler and LogRecord don't work well together
SF bug #757821: logging module docs

Applied Vinay Sajip's patch with a few minor fixups and a NEWS item.

Patched __init__.py - added new function
makeLogRecord (for bug report 760703).

Patched handlers.py - updated some docstrings and
deleted some old commented-out code.

Patched test_logging.py to make use of makeLogRecord.

Patched liblogging.tex to fill documentation gaps (both
760703 and bug 757821).
This commit is contained in:
Raymond Hettinger 2003-06-27 21:43:39 +00:00
parent 6ebe61fa80
commit 6f3eaa67e5
5 changed files with 59 additions and 32 deletions

View file

@ -70,8 +70,7 @@ class LogRecordStreamHandler(StreamRequestHandler):
while len(chunk) < slen:
chunk = chunk + self.connection.recv(slen - len(chunk))
obj = self.unPickle(chunk)
record = logging.LogRecord(None, None, "", 0, "", (), None)
record.__dict__.update(obj)
record = logging.makeLogRecord(obj)
self.handleLogRecord(record)
except:
raise