summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorScott Moser <smoser@ubuntu.com>2014-01-14 13:18:14 -0500
committerScott Moser <smoser@ubuntu.com>2014-01-14 13:18:14 -0500
commit08b50a6ea239f480493f202c563d788cabb92380 (patch)
treecf92f1ad69b48f2f1f9aabbd34aced6ae345f7a3 /config
parentb9314a18a052e934643c93b81dc938b3e5b69307 (diff)
downloadvyos-cloud-init-08b50a6ea239f480493f202c563d788cabb92380.tar.gz
vyos-cloud-init-08b50a6ea239f480493f202c563d788cabb92380.zip
provide default 'output' setting to log to /var/log/cloud-init-output.log
This has been "best practice" for quite some time, and its a common request of "where is the output of my user-data programs". http://askubuntu.com/questions/345344/where-are-the-logs-for-my-user-data-script-cloud-init
Diffstat (limited to 'config')
-rw-r--r--config/cloud.cfg.d/05_logging.cfg5
1 files changed, 5 insertions, 0 deletions
diff --git a/config/cloud.cfg.d/05_logging.cfg b/config/cloud.cfg.d/05_logging.cfg
index 410a0650..2e180730 100644
--- a/config/cloud.cfg.d/05_logging.cfg
+++ b/config/cloud.cfg.d/05_logging.cfg
@@ -59,3 +59,8 @@ log_cfgs:
- [ *log_base, *log_file ]
# A file path can also be used
# - /etc/log.conf
+
+# this tells cloud-init to redirect its stdout and stderr to
+# 'tee -a /var/log/cloud-init-output.log' so the user can see output
+# there without needing to look on the console.
+output: {all: '| tee -a /var/log/cloud-init-output.log'}