diff options
author | Narayan Desai <desai@mcs.anl.gov> | 2006-07-31 14:18:13 +0000 |
---|---|---|
committer | Narayan Desai <desai@mcs.anl.gov> | 2006-07-31 14:18:13 +0000 |
commit | 80394f3e3f4d36936dae1a38186786edba780f82 (patch) | |
tree | 2e09ed70e1a55f0433801f5701f555b3161fbed6 | |
parent | 70c98d7455de3a61bb8830f1507304b0c632f45c (diff) | |
download | bcfg2-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
-rw-r--r-- | src/lib/Logging.py | 2 |
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): |