Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d89c406

Browse files
committed
SF #642974, logging SysLogHandler proto type wrong
Syslog uses UDP (SOCK_DGRAM)
1 parent 94ac339 commit d89c406

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Lib/logging/handlers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ def __init__(self, address=('localhost', SYSLOG_UDP_PORT), facility=LOG_USER):
348348
self.address = address
349349
self.facility = facility
350350
if type(address) == types.StringType:
351-
self.socket = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
351+
self.socket = socket.socket(socket.AF_UNIX, socket.SOCK_DGRAM)
352352
self.socket.connect(address)
353353
self.unixsocket = 1
354354
else:

0 commit comments

Comments
 (0)