Backported change from trunk:

Made SysLogHandler more resilient in the face of syslogd failures.
This commit is contained in:
Vinay Sajip 2007-01-08 10:11:58 +00:00
parent 73fa6b58dd
commit 977061142d
1 changed files with 2 additions and 2 deletions

View File

@ -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