unify logging setup on all services
This provides a single setup_logging function which builds consistent
colorization if the config supports it, otherwise builds the identity
strings that we need to actually keep track of requests.
Change-Id: Iffe30326a5b974ad141aed6288f61e0d6fd18ca9
diff --git a/lib/glance b/lib/glance
index 1736114..26c4150 100644
--- a/lib/glance
+++ b/lib/glance
@@ -229,10 +229,8 @@
fi
# Format logging
- if [ "$LOG_COLOR" == "True" ] && [ "$SYSLOG" == "False" ]; then
- setup_colorized_logging $GLANCE_API_CONF
- setup_colorized_logging $GLANCE_REGISTRY_CONF
- fi
+ setup_logging $GLANCE_API_CONF
+ setup_logging $GLANCE_REGISTRY_CONF
cp -p $GLANCE_DIR/etc/glance-registry-paste.ini $GLANCE_REGISTRY_PASTE_INI
@@ -273,7 +271,7 @@
if is_service_enabled g-glare; then
local dburl
dburl=`database_connection_url glance`
- setup_colorized_logging $GLANCE_GLARE_CONF
+ setup_logging $GLANCE_GLARE_CONF
iniset $GLANCE_GLARE_CONF DEFAULT debug $ENABLE_DEBUG_LOG_LEVEL
iniset $GLANCE_GLARE_CONF DEFAULT bind_host $GLANCE_SERVICE_LISTEN_ADDRESS
iniset $GLANCE_GLARE_CONF DEFAULT bind_port $GLANCE_GLARE_PORT