[Patches] [ python-Patches-642974 ] logging SysLogHandler proto type wrong

noreply@sourceforge.net noreply@sourceforge.net
Sat, 23 Nov 2002 21:40:45 -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:


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=642974&group_id=5470