From e826490a437e13a493f53b7751bea58dff2b30f5 Mon Sep 17 00:00:00 2001 From: Ronald Bradford <ronald.bradford@gmail.com> Date: Wed, 20 Jan 2016 21:16:33 +0000 Subject: [PATCH] Simplify oslo.log configuration options Use the preferred logging_user_identity_format option to specify an alternative context format in log files. The removal of defining logging_context_format_string brings this more inline with optimal production configuration of using the defined default. logging_user_identity_format is set in devstack to maintain current compatibility of names instead of ids. Change-Id: I3807d76b91b6cc1614b4a9a203509f8e1ad7146d --- lib/neutron-legacy | 2 +- lib/nova | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/neutron-legacy b/lib/neutron-legacy index 692d5eae16..978cbdb89c 100644 --- a/lib/neutron-legacy +++ b/lib/neutron-legacy @@ -963,7 +963,7 @@ function _configure_neutron_common { setup_colorized_logging $NEUTRON_CONF DEFAULT project_id else # Show user_name and project_name by default like in nova - iniset $NEUTRON_CONF DEFAULT logging_context_format_string "%(asctime)s.%(msecs)03d %(levelname)s %(name)s [%(request_id)s %(user_name)s %(project_name)s] %(instance)s%(message)s" + iniset $NEUTRON_CONF DEFAULT logging_user_identity_format "%(user_name)s %(project_name)s" fi if is_service_enabled tls-proxy; then diff --git a/lib/nova b/lib/nova index 62481edfce..b9769a739d 100644 --- a/lib/nova +++ b/lib/nova @@ -546,7 +546,7 @@ function create_nova_conf { setup_colorized_logging $NOVA_CONF DEFAULT else # Show user_name and project_name instead of user_id and project_id - iniset $NOVA_CONF DEFAULT logging_context_format_string "%(asctime)s.%(msecs)03d %(levelname)s %(name)s [%(request_id)s %(user_name)s %(project_name)s] %(instance)s%(message)s" + iniset $NOVA_CONF DEFAULT logging_user_identity_format "%(user_name)s %(project_name)s" fi if [ "$NOVA_USE_MOD_WSGI" == "True" ]; then _config_nova_apache_wsgi