summaryrefslogtreecommitdiffstats
path: root/src/lib/Logging.py
diff options
context:
space:
mode:
authorNarayan Desai <desai@mcs.anl.gov>2006-07-31 14:18:13 +0000
committerNarayan Desai <desai@mcs.anl.gov>2006-07-31 14:18:13 +0000
commit80394f3e3f4d36936dae1a38186786edba780f82 (patch)
tree2e09ed70e1a55f0433801f5701f555b3161fbed6 /src/lib/Logging.py
parent70c98d7455de3a61bb8830f1507304b0c632f45c (diff)
downloadbcfg2-80394f3e3f4d36936dae1a38186786edba780f82.tar.gz
bcfg2-80394f3e3f4d36936dae1a38186786edba780f82.tar.bz2
bcfg2-80394f3e3f4d36936dae1a38186786edba780f82.zip
Fix syslog reconnect code
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@2016 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/lib/Logging.py')
-rw-r--r--src/lib/Logging.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/lib/Logging.py b/src/lib/Logging.py
index 93ed1ca6f..f2401791e 100644
--- a/src/lib/Logging.py
+++ b/src/lib/Logging.py
@@ -111,7 +111,9 @@ class FragmentingSysLogHandler(logging.handlers.SysLogHandler):
try:
self.socket.send(msg)
except socket.error:
+ self.socket = socket.socket(socket.AF_UNIX, socket.SOCK_DGRAM)
self.socket.connect(self.address)
+ self.socket.send("Reconnected to syslog")
self.socket.send(msg)
def setup_logging(procname, to_console=True, to_syslog=True, syslog_facility='local0', level=0):