From da1cc5780d9501f5705a5e9844e819067514217f Mon Sep 17 00:00:00 2001 From: Morgan Fainberg Date: Tue, 2 Feb 2016 09:09:28 -0800 Subject: [PATCH] Remove microseconds from apache log(s) Remove the microseconds from the apache logs and move back to using milliseconds. There is no longer any 2.2 workarounds in the keystone setup process. Change-Id: I8787eee41fbde1f9794aeffe1e862af0d5117bc3 --- files/apache-keystone.template | 16 +++------------- lib/keystone | 9 ++++----- 2 files changed, 7 insertions(+), 18 deletions(-) diff --git a/files/apache-keystone.template b/files/apache-keystone.template index f9fa265db5..428544f25c 100644 --- a/files/apache-keystone.template +++ b/files/apache-keystone.template @@ -3,13 +3,7 @@ Listen %ADMINPORT% LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\" %D(us)" keystone_combined - = 2.4> - Require all granted - - - Order allow,deny - Allow from all - + Require all granted @@ -18,9 +12,7 @@ LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\" %D(us)" WSGIScriptAlias / %KEYSTONE_BIN%/keystone-wsgi-public WSGIApplicationGroup %{GLOBAL} WSGIPassAuthorization On - = 2.4> - ErrorLogFormat "%{cu}t %M" - + ErrorLogFormat "%M" ErrorLog /var/log/%APACHE_NAME%/keystone.log CustomLog /var/log/%APACHE_NAME%/keystone_access.log keystone_combined %SSLENGINE% @@ -34,9 +26,7 @@ LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\" %D(us)" WSGIScriptAlias / %KEYSTONE_BIN%/keystone-wsgi-admin WSGIApplicationGroup %{GLOBAL} WSGIPassAuthorization On - = 2.4> - ErrorLogFormat "%{cu}t %M" - + ErrorLogFormat "%M" ErrorLog /var/log/%APACHE_NAME%/keystone.log CustomLog /var/log/%APACHE_NAME%/keystone_access.log keystone_combined %SSLENGINE% diff --git a/lib/keystone b/lib/keystone index 507ee555c2..73332221c7 100644 --- a/lib/keystone +++ b/lib/keystone @@ -299,11 +299,10 @@ function configure_keystone { iniset $KEYSTONE_CONF DEFAULT debug $ENABLE_DEBUG_LOG_LEVEL if [ "$KEYSTONE_USE_MOD_WSGI" == "True" ]; then - # 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" - iniset $KEYSTONE_CONF DEFAULT logging_debug_format_suffix "%(funcName)s %(pathname)s:%(lineno)d" - iniset $KEYSTONE_CONF DEFAULT logging_exception_prefix "%(process)d TRACE %(name)s %(instance)s" + iniset $KEYSTONE_CONF DEFAULT logging_context_format_string "%(asctime)s.%(msecs)03d %(process)d %(levelname)s %(name)s [%(request_id)s %(user_identity)s] %(instance)s%(message)s" + iniset $KEYSTONE_CONF DEFAULT logging_default_format_string "%(asctime)s.%(msecs)03d %(process)d %(levelname)s %(name)s [-] %(instance)s%(message)s" + iniset $KEYSTONE_CONF DEFAULT logging_debug_format_suffix "%(asctime)s.%(msecs)03d %(funcName)s %(pathname)s:%(lineno)d" + iniset $KEYSTONE_CONF DEFAULT logging_exception_prefix "%(asctime)s.%(msecs)03d %(process)d TRACE %(name)s %(instance)s" _config_keystone_apache_wsgi else iniset $KEYSTONE_CONF eventlet_server admin_bind_host "$KEYSTONE_ADMIN_BIND_HOST"