Remove explicit log file for barbican

The log file cannot be written to when running under apache so let's
switch to the default value and rely on apache for logging.

Change-Id: Icbaecc894d1b9370c6a27da16b0bd59cd8039018
This commit is contained in:
Alex Schultz 2017-03-30 16:02:50 -06:00
parent 03eac29e7b
commit 0cecc86038
3 changed files with 8 additions and 3 deletions

View File

@ -27,7 +27,7 @@
#
# [*log_file*]
# (optional) File where logs should be stored.
# Defaults to '/var/log/barbican/api.log'
# Defaults to $::os_service_default
#
# [*logging_context_format_string*]
# (optional) Format string to use for log messages with context.
@ -98,7 +98,7 @@ class barbican::api::logging(
$use_stderr = $::os_service_default,
$log_facility = $::os_service_default,
$log_dir = '/var/log/barbican',
$log_file = '/var/log/barbican/api.log',
$log_file = $::os_service_default,
$debug = $::os_service_default,
$logging_context_format_string = $::os_service_default,
$logging_default_format_string = $::os_service_default,

View File

@ -0,0 +1,5 @@
---
fixes:
- Remove explcit barbican.log file as apache cannot write to this file when
selinux is enabled. Instead operators should define this file if they want
to use it or rely on the logging in apache.

View File

@ -101,7 +101,7 @@ describe 'barbican::api::logging' do
:log_config_append, :publish_errors,
:default_log_levels, :fatal_deprecations,
:instance_format, :instance_uuid_format,
:log_date_format, ].each { |param|
:log_date_format, :log_file ].each { |param|
it { is_expected.to contain_barbican_config("DEFAULT/#{param}").with_value('<SERVICE DEFAULT>') }
}
end