This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: logging SysLogHandler proto type wrong
Type: Stage:
Components: Library (Lib) Versions: Python 2.3
process
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: nnorwitz Nosy List: chrism, nnorwitz, vinay.sajip
Priority: normal Keywords: patch

Created on 2002-11-24 05:40 by chrism, last changed 2022-04-10 16:05 by admin. This issue is now closed.

Messages (3)
msg41750 - (view) Author: Chris McDonough (chrism) Date: 2002-11-24 05:40
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:
msg41751 - (view) Author: Vinay Sajip (vinay.sajip) * (Python committer) Date: 2003-01-03 11:12
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.
msg41752 - (view) Author: Neal Norwitz (nnorwitz) * (Python committer) Date: 2003-01-26 02:18
Logged In: YES 
user_id=33168

Thanks!  Checked in as Lib/logging/handlers.py 1.3
History
Date User Action Args
2022-04-10 16:05:56adminsetgithub: 37525
2002-11-24 05:40:45chrismcreate