From 9b1df576342e2151df4b6e8daec3ccb72abc238a Mon Sep 17 00:00:00 2001 From: venkata anil Date: Thu, 15 Jan 2015 07:38:22 +0000 Subject: [PATCH] neutron should log user_name and project_name by default like in nova neutron doesn't log user_name and project_name along side req-id in devstack logs. So, Openstack jenkins neutron check and gate jobs also not logging user_name and project_name along side req-id. Without knowing the user and tenant, its hard to understand what the logs are doing when multiple tenants are using the cloud. Nova is logging user_name and project_name by default. So porting the same changes to neutron. Change-Id: I10eac2e4177a898e9bcc60c08f3bd39a2ec9f31b Closes-Bug: #1399788 --- lib/neutron | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/neutron b/lib/neutron index b4d0b8cad4..52cc575d1c 100755 --- a/lib/neutron +++ b/lib/neutron @@ -837,6 +837,9 @@ function _configure_neutron_common { # Format logging if [ "$LOG_COLOR" == "True" ] && [ "$SYSLOG" == "False" ]; then 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" fi if is_service_enabled tls-proxy; then