From 3fcd2baf95332e814e56a7cddc1b85dd15ae6391 Mon Sep 17 00:00:00 2001 From: Gary Kotton Date: Mon, 22 Sep 2014 00:55:02 -0700 Subject: [PATCH] Ensure that keystone uses global debug setting When setting ENABLE_DEBUG_LOG_LEVEL the keystone screen would ignore this setting and always use the debug mode. Change-Id: I934443c2976e936198fc93da4cca717e6cb84e6f --- lib/keystone | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/keystone b/lib/keystone index b6a4e1097a..68e8f9fe79 100644 --- a/lib/keystone +++ b/lib/keystone @@ -283,7 +283,7 @@ function configure_keystone { fi if [ "$KEYSTONE_USE_MOD_WSGI" == "True" ]; then - iniset $KEYSTONE_CONF DEFAULT debug "True" + iniset $KEYSTONE_CONF DEFAULT debug $ENABLE_DEBUG_LOG_LEVEL # Eliminate the %(asctime)s.%(msecs)03d from the log format strings iniset $KEYSTONE_CONF DEFAULT logging_context_format_string "%(process)d %(levelname)s %(name)s [%(request_id)s %(user_identity)s] %(instance)s%(message)s" iniset $KEYSTONE_CONF DEFAULT logging_default_format_string "%(process)d %(levelname)s %(name)s [-] %(instance)s%(message)s" @@ -476,8 +476,12 @@ function start_keystone { tail_log key /var/log/$APACHE_NAME/keystone.log tail_log key-access /var/log/$APACHE_NAME/keystone_access.log else + local EXTRA_PARAMS="" + if [ "$ENABLE_DEBUG_LOG_LEVEL" == "True" ]; then + EXTRA_PARAMS="--debug" + fi # Start Keystone in a screen window - run_process key "$KEYSTONE_DIR/bin/keystone-all --config-file $KEYSTONE_CONF --debug" + run_process key "$KEYSTONE_DIR/bin/keystone-all --config-file $KEYSTONE_CONF $EXTRA_PARAMS" fi echo "Waiting for keystone to start..."