From 583c37038b5a8d80c75a7705076f021852820bd5 Mon Sep 17 00:00:00 2001 From: Alexey Dushechkin Date: Thu, 9 Jun 2016 22:26:59 +0600 Subject: [PATCH] Add support for CustomLog format modification Operators may want to log additional stuff for Horizon requests like response time. This change adds configurable log format. Change-Id: I308aa085845c17a766dd7df042237b2cfcb6a0d6 --- defaults/main.yml | 1 + ...s-horizon-apache-log-format-support-34c9ef74b3bcce31.yaml | 5 +++++ templates/openstack_dashboard.conf.j2 | 2 +- 3 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 releasenotes/notes/os-horizon-apache-log-format-support-34c9ef74b3bcce31.yaml diff --git a/defaults/main.yml b/defaults/main.yml index 8090fc6b..862f6d2c 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -73,6 +73,7 @@ horizon_server_name: "{{ ansible_hostname | default('horizon') }}" horizon_apache_servertokens: "Prod" horizon_apache_serversignature: "Off" horizon_log_level: info +horizon_apache_custom_log_format: combined horizon_dropdown_max_items: 30 horizon_time_zone: UTC horizon_enforce_password_check: False diff --git a/releasenotes/notes/os-horizon-apache-log-format-support-34c9ef74b3bcce31.yaml b/releasenotes/notes/os-horizon-apache-log-format-support-34c9ef74b3bcce31.yaml new file mode 100644 index 00000000..67c0f90e --- /dev/null +++ b/releasenotes/notes/os-horizon-apache-log-format-support-34c9ef74b3bcce31.yaml @@ -0,0 +1,5 @@ +--- +features: + - Added ``horizon_apache_custom_log_format`` tunable + to the os-horizon role for changing CustomLog format. + Default is "combined". diff --git a/templates/openstack_dashboard.conf.j2 b/templates/openstack_dashboard.conf.j2 index 3efd7d4f..11096763 100644 --- a/templates/openstack_dashboard.conf.j2 +++ b/templates/openstack_dashboard.conf.j2 @@ -17,7 +17,7 @@ LogLevel {{ horizon_log_level }} ErrorLog /var/log/horizon/horizon-error.log - CustomLog /var/log/horizon/ssl_access.log combined + CustomLog /var/log/horizon/ssl_access.log {{ horizon_apache_custom_log_format }} Options +FollowSymLinks {% if not horizon_external_ssl | bool %} SSLEngine on