summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorJoshua Harlow <harlowja@yahoo-inc.com>2012-06-19 12:16:51 -0700
committerJoshua Harlow <harlowja@yahoo-inc.com>2012-06-19 12:16:51 -0700
commitce396ee2fcbe2eeac22e76ea1fc5b6aa01e4f298 (patch)
treed44dfc22c9d9c48fb6d87d1c8b299744ffdc5f7f /bin
parentd50bc13aa357f6c3fa9d55f89f3e6c006102f559 (diff)
downloadvyos-cloud-init-ce396ee2fcbe2eeac22e76ea1fc5b6aa01e4f298.tar.gz
vyos-cloud-init-ce396ee2fcbe2eeac22e76ea1fc5b6aa01e4f298.zip
Small logging changes.
Diffstat (limited to 'bin')
-rwxr-xr-xbin/cloud-init2.py13
1 files changed, 6 insertions, 7 deletions
diff --git a/bin/cloud-init2.py b/bin/cloud-init2.py
index e1757af4..d80ee1ec 100755
--- a/bin/cloud-init2.py
+++ b/bin/cloud-init2.py
@@ -106,9 +106,9 @@ def main_init(name, args):
init.read_cfg(cfg_extra_paths)
# Stage 2
try:
- util.fixup_output(init.cfg, 'init')
+ util.fixup_output(init.cfg, name)
except:
- util.logexc(LOG, "Failed to setup output redirection")
+ util.logexc(LOG, "Failed to setup output redirection!")
if args.debug:
# Reset so that all the debug handlers are closed out
LOG.debug("Logging being reset, this logger may no longer be active shortly")
@@ -118,7 +118,7 @@ def main_init(name, args):
try:
init.initialize()
except Exception as e:
- util.logexc(LOG, "Failed to initialize, likely bad things to come: %s", e)
+ util.logexc(LOG, "Failed to initialize, likely bad things to come!")
# Stage 4
path_helper = init.paths
if not args.local:
@@ -159,8 +159,7 @@ def main_init(name, args):
try:
init.fetch()
except sources.DataSourceNotFoundException as e:
- util.logexc(LOG, "No instance datasource found")
- warn("No instance datasource found: %s" % (e))
+ util.logexc(LOG, "No instance datasource found!")
# TODO: Return 0 or 1??
return 1
# Stage 6
@@ -176,8 +175,8 @@ def main_init(name, args):
if not ran:
init.consume(settings.ALWAYS)
except Exception as e:
- warn("Consuming user data failed: %s" % (e))
- raise
+ util.logexc(LOG, "Consuming user data failed!")
+ return 1
# Stage 8