From cef4e846797ed7aee29e18b00810887c67591abc Mon Sep 17 00:00:00 2001 From: Scott Moser Date: Wed, 19 Sep 2012 16:33:56 -0400 Subject: 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. --- cloudinit/signal_handler.py | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'cloudinit/signal_handler.py') 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)) -- cgit v1.2.3