summaryrefslogtreecommitdiff
path: root/cloudinit/config/cc_final_message.py
diff options
context:
space:
mode:
authorJoshua Harlow <harlowja@yahoo-inc.com>2012-07-01 00:19:49 -0700
committerJoshua Harlow <harlowja@yahoo-inc.com>2012-07-01 00:19:49 -0700
commitaa9189e89ec101fba8ca36919a7c800f8b28d5c0 (patch)
treee81d2709f813c8c48b3c0994496dce06c2c78047 /cloudinit/config/cc_final_message.py
parent342ffe553574c7662d143d3da76f8f4fb6587983 (diff)
downloadvyos-cloud-init-aa9189e89ec101fba8ca36919a7c800f8b28d5c0.tar.gz
vyos-cloud-init-aa9189e89ec101fba8ca36919a7c800f8b28d5c0.zip
Add a multi log function that can write to stderr, console and a log debug, useful in certain cases
Diffstat (limited to 'cloudinit/config/cc_final_message.py')
-rw-r--r--cloudinit/config/cc_final_message.py6
1 files changed, 1 insertions, 5 deletions
diff --git a/cloudinit/config/cc_final_message.py b/cloudinit/config/cc_final_message.py
index fd59aa1e..711e7b5b 100644
--- a/cloudinit/config/cc_final_message.py
+++ b/cloudinit/config/cc_final_message.py
@@ -18,8 +18,6 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-import sys
-
from cloudinit import templater
from cloudinit import util
from cloudinit import version
@@ -57,9 +55,7 @@ def handle(_name, cfg, cloud, log, args):
'timestamp': ts,
'version': cver,
}
- # Use stdout, stderr or the logger??
- content = templater.render_string(msg_in, subs)
- sys.stderr.write("%s\n" % (content))
+ util.multi_log("%s\n" % (templater.render_string(msg_in, subs)))
except Exception:
util.logexc(log, "Failed to render final message template")