From 556ffe402252b8e993f7849a2d7e959adc8c6291 Mon Sep 17 00:00:00 2001 From: Steve Baker Date: Tue, 6 Aug 2013 16:42:38 +1200 Subject: [PATCH] Colorize heat engine log Change-Id: If6ffb234e360e8a579eb8e1e7baedb90354b10ae --- lib/heat | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/heat b/lib/heat index 92b4e50ee2..568f4d00ca 100644 --- a/lib/heat +++ b/lib/heat @@ -125,6 +125,14 @@ function configure_heat() { iniset_rpc_backend heat $HEAT_ENGINE_CONF DEFAULT + if [ "$LOG_COLOR" == "True" ] && [ "$SYSLOG" == "False" ]; then + # Add color to logging output + iniset $HEAT_ENGINE_CONF DEFAULT logging_context_format_string "%(asctime)s.%(msecs)03d %(color)s%(levelname)s %(name)s [%(request_id)s %(user_name)s %(project_name)s%(color)s] %(instance)s%(color)s%(message)s" + iniset $HEAT_ENGINE_CONF DEFAULT logging_default_format_string "%(asctime)s.%(msecs)03d %(color)s%(levelname)s %(name)s [-%(color)s] %(instance)s%(color)s%(message)s" + iniset $HEAT_ENGINE_CONF DEFAULT logging_debug_format_suffix "from (pid=%(process)d) %(funcName)s %(pathname)s:%(lineno)d" + iniset $HEAT_ENGINE_CONF DEFAULT logging_exception_prefix "%(color)s%(asctime)s.%(msecs)03d TRACE %(name)s %(instance)s" + fi + # Cloudwatch API HEAT_API_CW_CONF=$HEAT_CONF_DIR/heat-api-cloudwatch.conf cp $HEAT_DIR/etc/heat/heat-api-cloudwatch.conf $HEAT_API_CW_CONF