Backported change from trunk:
Made SysLogHandler more resilient in the face of syslogd failures.
This commit is contained in:
parent
73fa6b58dd
commit
977061142d
|
@ -586,11 +586,11 @@ class SysLogHandler(logging.Handler):
|
|||
self.address = address
|
||||
self.facility = facility
|
||||
if type(address) == types.StringType:
|
||||
self._connect_unixsocket(address)
|
||||
self.unixsocket = 1
|
||||
self._connect_unixsocket(address)
|
||||
else:
|
||||
self.socket = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
|
||||
self.unixsocket = 0
|
||||
self.socket = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
|
||||
|
||||
self.formatter = None
|
||||
|
||||
|
|
Loading…
Reference in New Issue