From c82a0898139d7fd1a78144f13d212d04ab0b5f33 Mon Sep 17 00:00:00 2001 From: Alexey Dushechkin Date: Mon, 6 Jun 2016 17:14:29 +0600 Subject: [PATCH] Add support for CustomLog format modification Operators may want to log additional stuff for Keystone requests like response time. This change adds configurable log format. Change-Id: I6c26335877bb3e5de0178d540e3fe72ceac1734c --- defaults/main.yml | 1 + ...s-keystone-apache-log-format-support-7232177f835222ee.yaml | 4 ++++ templates/keystone-httpd.conf.j2 | 4 ++-- 3 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 releasenotes/notes/os-keystone-apache-log-format-support-7232177f835222ee.yaml diff --git a/defaults/main.yml b/defaults/main.yml index 987bab90..4a53f143 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -158,6 +158,7 @@ keystone_service_adminurl: "{{ keystone_service_adminurl_v3 }}" ## Apache setup keystone_apache_log_level: info +keystone_apache_custom_log_format: combined keystone_apache_servertokens: "Prod" keystone_apache_serversignature: "Off" keystone_wsgi_threads: 1 diff --git a/releasenotes/notes/os-keystone-apache-log-format-support-7232177f835222ee.yaml b/releasenotes/notes/os-keystone-apache-log-format-support-7232177f835222ee.yaml new file mode 100644 index 00000000..ed27f8f1 --- /dev/null +++ b/releasenotes/notes/os-keystone-apache-log-format-support-7232177f835222ee.yaml @@ -0,0 +1,4 @@ +--- +features: + - Added keystone_apache_custom_log_format tunable for + changing CustomLog format. Default is "combined". diff --git a/templates/keystone-httpd.conf.j2 b/templates/keystone-httpd.conf.j2 index 29b7f0d1..e17c8ddd 100644 --- a/templates/keystone-httpd.conf.j2 +++ b/templates/keystone-httpd.conf.j2 @@ -14,7 +14,7 @@ LogLevel {{ keystone_apache_log_level }} ErrorLog /var/log/keystone/keystone-apache-error.log - CustomLog /var/log/keystone/ssl_access.log combined + CustomLog /var/log/keystone/ssl_access.log {{ keystone_apache_custom_log_format }} Options +FollowSymLinks {% if keystone_ssl | bool and keystone_service_internaluri_proto == "https" -%} @@ -72,7 +72,7 @@ LogLevel {{ keystone_apache_log_level }} ErrorLog /var/log/keystone/keystone-apache-error.log - CustomLog /var/log/keystone/ssl_access.log combined + CustomLog /var/log/keystone/ssl_access.log {{ keystone_apache_custom_log_format }} Options +FollowSymLinks {% if keystone_ssl | bool and keystone_service_adminuri_proto == "https" -%}