diff options
author | Scott Moser <smoser@ubuntu.com> | 2012-07-10 17:47:02 -0400 |
---|---|---|
committer | Scott Moser <smoser@ubuntu.com> | 2012-07-10 17:47:02 -0400 |
commit | e119877fcf9c38a89c4a054b146d8189b866d4e8 (patch) | |
tree | e62eeff323e8c60ce1b41f9a2f3da32dfa63f5ed /cloudinit/util.py | |
parent | fa09651fcea222d661803b6a86a79fbf6f147374 (diff) | |
download | vyos-cloud-init-e119877fcf9c38a89c4a054b146d8189b866d4e8.tar.gz vyos-cloud-init-e119877fcf9c38a89c4a054b146d8189b866d4e8.zip |
send welcome message after logging has been applied
in the 'cloud-init init' stages, we want the welcome message to get to the
correct output as specified by the system's configuration. Ie, if the
local /etc/cloud.config.d had 'output' or 'log_cfg' settings we want those
to be able to affect the welcome message also.
In normal operation, nothing else will go to stdout or stderr before this,
and likely/hopefully nothing terribly important to the logs.
Diffstat (limited to 'cloudinit/util.py')
-rw-r--r-- | cloudinit/util.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/cloudinit/util.py b/cloudinit/util.py index 6501cbdf..e7a2ebcd 100644 --- a/cloudinit/util.py +++ b/cloudinit/util.py @@ -288,8 +288,10 @@ def multi_log(text, console=True, stderr=True, wfh.write(text) wfh.flush() if log: - log.log(log_level, text) - + if text[-1] == "\n": + log.log(log_level, text[:-1]) + else: + log.log(log_level, text) def is_ipv4(instr): """ determine if input string is a ipv4 address. return boolean""" |