Keystone use common logging setup
The Keystone setup was using logging.conf to configure logging, unlike other projects. This may have been left over from before Keystone switched to oslo logging. Switching to common logging configuration allows: - Common format for logs for easier parsing - Pretty colorized logs - Keystone can control the default logging levels for libraries that are used by setting the defaults in keystone. - Potentially using a function to setup logging for all components using oslo-logging (e.g., share with lib/nova). Change-Id: I4e9b1e6cffce30f16a1e039224312852b8abda07 Closes-Bug: #1271775 Closes-Bug: #1269987
This commit is contained in:
parent
6d323f43b4
commit
4968d1ad5d
14
lib/keystone
14
lib/keystone
|
@ -247,14 +247,14 @@ function configure_keystone() {
|
|||
fi
|
||||
|
||||
# Set up logging
|
||||
LOGGING_ROOT="devel"
|
||||
if [ "$SYSLOG" != "False" ]; then
|
||||
LOGGING_ROOT="$LOGGING_ROOT,production"
|
||||
iniset $KEYSTONE_CONF DEFAULT use_syslog "True"
|
||||
fi
|
||||
|
||||
# Format logging
|
||||
if [ "$LOG_COLOR" == "True" ] && [ "$SYSLOG" == "False" ]; then
|
||||
setup_colorized_logging $KEYSTONE_CONF DEFAULT
|
||||
fi
|
||||
KEYSTONE_LOG_CONFIG="--log-config $KEYSTONE_CONF_DIR/logging.conf"
|
||||
cp $KEYSTONE_DIR/etc/logging.conf.sample $KEYSTONE_CONF_DIR/logging.conf
|
||||
iniset $KEYSTONE_CONF_DIR/logging.conf logger_root level "DEBUG"
|
||||
iniset $KEYSTONE_CONF_DIR/logging.conf logger_root handlers "devel,production"
|
||||
|
||||
if is_apache_enabled_service key; then
|
||||
_config_keystone_apache_wsgi
|
||||
|
@ -412,7 +412,7 @@ function start_keystone() {
|
|||
screen_it key "cd $KEYSTONE_DIR && sudo tail -f /var/log/$APACHE_NAME/keystone"
|
||||
else
|
||||
# Start Keystone in a screen window
|
||||
screen_it key "cd $KEYSTONE_DIR && $KEYSTONE_DIR/bin/keystone-all --config-file $KEYSTONE_CONF $KEYSTONE_LOG_CONFIG --debug"
|
||||
screen_it key "cd $KEYSTONE_DIR && $KEYSTONE_DIR/bin/keystone-all --config-file $KEYSTONE_CONF --debug"
|
||||
fi
|
||||
|
||||
echo "Waiting for keystone to start..."
|
||||
|
|
Loading…
Reference in New Issue