[Patches] [ python-Patches-642974 ] logging SysLogHandler proto type wrong
noreply@sourceforge.net
noreply@sourceforge.net
Fri, 03 Jan 2003 03:12:13 -0800
Patches item #642974, was opened at 2002-11-24 05:40
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=642974&group_id=5470
Category: Library (Lib)
Group: Python 2.3
Status: Open
Resolution: None
Priority: 5
Submitted By: Chris McDonough (chrism)
Assigned to: Nobody/Anonymous (nobody)
Summary: logging SysLogHandler proto type wrong
Initial Comment:
The (new) logging module's handlers.SysLogHandler has
an incorrect protocol type when the address is a
file-like object. It fails during connect as a result.
A patch is as follows:
--- handlers.py 13 Nov 2002 16:18:29 -0000 1.2
+++ handlers.py 24 Nov 2002 05:36:51 -0000
@@ -348,7 +348,7 @@
self.address = address
self.facility = facility
if type(address) == types.StringType:
- self.socket =
socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
+ self.socket =
socket.socket(socket.AF_UNIX, socket.SOCK_DGRAM)
self.socket.connect(address)
self.unixsocket = 1
else:
----------------------------------------------------------------------
Comment By: Vinay Sajip (vsajip)
Date: 2003-01-03 11:12
Message:
Logged In: YES
user_id=308438
I'm happy to accept the patch, though I cannot test at the
moment due to a hardware failure of my Linux machine.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=642974&group_id=5470