summaryrefslogtreecommitdiff
path: root/cloudinit/signal_handler.py
diff options
context:
space:
mode:
authorScott Moser <smoser@ubuntu.com>2012-09-19 16:33:56 -0400
committerScott Moser <smoser@ubuntu.com>2012-09-19 16:33:56 -0400
commitcef4e846797ed7aee29e18b00810887c67591abc (patch)
tree5a184e01dc5e79bf7e9bd0db4b4a13e6f9d363af /cloudinit/signal_handler.py
parent24d2457c2eab89f135e2b483f05d52eee0169af7 (diff)
downloadvyos-cloud-init-cef4e846797ed7aee29e18b00810887c67591abc.tar.gz
vyos-cloud-init-cef4e846797ed7aee29e18b00810887c67591abc.zip
do not disable logging on signal
I had previously asked for this, but we're hoping to handle it in a more generic way. Just because we receive a signal doesn't mean that all logging is broken. The more general solution we'll chase is to catch a failure of a log message and fall back if necessary across the board. That way cloud-init will still send logging to the right places on a user interupt.
Diffstat (limited to 'cloudinit/signal_handler.py')
-rw-r--r--cloudinit/signal_handler.py11
1 files changed, 0 insertions, 11 deletions
diff --git a/cloudinit/signal_handler.py b/cloudinit/signal_handler.py
index 34e075a2..40b0c94c 100644
--- a/cloudinit/signal_handler.py
+++ b/cloudinit/signal_handler.py
@@ -54,17 +54,6 @@ def _pprint_frame(frame, depth, max_depth, contents):
def _handle_exit(signum, frame):
(msg, rc) = EXIT_FOR[signum]
- # Reset logging so that only the basic logging
- # is active since the state of syslog or other
- # logging processes is unknown if we are being
- # signaled by a reboot process which is external and
- # killing other processes while this process is being
- # finished off...
- try:
- logging.resetLogging()
- logging.setupBasicLogging()
- except:
- pass
msg = msg % ({'version': vr.version()})
contents = StringIO()
contents.write("%s\n" % (msg))