From 206455120fd6cc6f9e41314b1076bc9558f25a89 Mon Sep 17 00:00:00 2001 From: akwasniewska Date: Tue, 17 Nov 2015 19:07:34 +0100 Subject: [PATCH] Fixed log error messages from keystone to syslog. Rsyslog adapted to filter keystone error log messages. Related bug: 1516462 Change-Id: I4d8d4280dc8fef870d56d8466ed466241ee18e64 --- ansible/roles/common/templates/rsyslog.conf.j2 | 3 ++- ansible/roles/keystone/templates/keystone.conf.j2 | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ansible/roles/common/templates/rsyslog.conf.j2 b/ansible/roles/common/templates/rsyslog.conf.j2 index f20438cd5b..c1334d0eee 100755 --- a/ansible/roles/common/templates/rsyslog.conf.j2 +++ b/ansible/roles/common/templates/rsyslog.conf.j2 @@ -61,7 +61,8 @@ $template NeutronL3AgentFile,"/var/log/neutron/neutron-l3-agent.log" :syslogtag,contains,"neutron-l3-agent" ?NeutronL3AgentFile $template KeystoneErrorFile,"/var/log/keystone/keystone-error.log" -:syslogtag,contains,"keystone-error" ?KeystoneErrorFile +if ($syslogtag contains "keystone-error") \ +or ($syslogtag contains "keystone" and $syslogseverity <=4) then ?KeystoneErrorFile $template KeystoneAccessFile,"/var/log/keystone/keystone-access.log" :syslogtag,contains,"keystone-access" ?KeystoneAccessFile diff --git a/ansible/roles/keystone/templates/keystone.conf.j2 b/ansible/roles/keystone/templates/keystone.conf.j2 index 4ea79a5662..80c29b6dd1 100644 --- a/ansible/roles/keystone/templates/keystone.conf.j2 +++ b/ansible/roles/keystone/templates/keystone.conf.j2 @@ -1,6 +1,8 @@ [DEFAULT] verbose = {{ keystone_logging_verbose }} debug = {{ keystone_logging_debug }} +syslog_log_facility=LOG_LOCAL0 +use_syslog = True admin_token = {{ keystone_admin_token }}