summaryrefslogtreecommitdiffstats
path: root/src/lib/Logger.py
diff options
context:
space:
mode:
authorNarayan Desai <desai@mcs.anl.gov>2009-04-24 16:23:54 +0000
committerNarayan Desai <desai@mcs.anl.gov>2009-04-24 16:23:54 +0000
commitf8b1a55d842f2beef4823b825552ff440b80c655 (patch)
tree7b8366a4cd81be34ab736798de9d97b3084222e4 /src/lib/Logger.py
parentaef42921437ebc85357e378e87706141303405d3 (diff)
downloadbcfg2-f8b1a55d842f2beef4823b825552ff440b80c655.tar.gz
bcfg2-f8b1a55d842f2beef4823b825552ff440b80c655.tar.bz2
bcfg2-f8b1a55d842f2beef4823b825552ff440b80c655.zip
Logging: Fix reconnect when using /dev/log
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5177 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/lib/Logger.py')
-rw-r--r--src/lib/Logger.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/Logger.py b/src/lib/Logger.py
index 129d10314..db4c4dd09 100644
--- a/src/lib/Logger.py
+++ b/src/lib/Logger.py
@@ -125,13 +125,13 @@ class FragmentingSysLogHandler(logging.handlers.SysLogHandler):
try:
self.socket.send(msg)
except socket.error:
- while True:
+ for i in xrange(10):
try:
if isinstance(self.address, tuple):
self.socket = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
+ self.socket.connect(self.address)
else:
- self.socket = socket.socket(socket.AF_UNIX, socket.SOCK_DGRAM)
- self.socket.connect(self.address)
+ self._connect_unixsocket(self.address)
break
except socket.error:
continue