Set log_facility, log_level in obj expirer
Object expirer does not have log_facility set explicitly and defaults to LOG_LOCAL0, thus logging to /var/log/messages All other swift services have been set to LOG_LOCAL2. This patch changes object expirer to LOG_LOCAL2. Change-Id: I037090eecc9832e7c7397a5a9e52df4a23f6c16e Signed-off-by: Thiago da Silva <thiago@redhat.com>
This commit is contained in:
parent
ecb052b9e1
commit
25d88e9823
@ -71,6 +71,14 @@
|
||||
# pipeline, e.g. ['catch_errors', 'cache', 'proxy-server']
|
||||
# Defaults to ['127.0.0.1:11211']
|
||||
#
|
||||
# [*log_level*]
|
||||
# (optional) Log level.
|
||||
# Defaults to 'INFO'.
|
||||
#
|
||||
# [*log_facility*]
|
||||
# (optional) Log level
|
||||
# Defaults to 'LOG_LOCAL2'.
|
||||
#
|
||||
class swift::objectexpirer(
|
||||
$manage_service = true,
|
||||
$enabled = true,
|
||||
@ -87,6 +95,8 @@ class swift::objectexpirer(
|
||||
$report_interval = 300,
|
||||
$service_provider = $::swift::params::service_provider,
|
||||
$memcache_servers = ['127.0.0.1:11211'],
|
||||
$log_level = 'INFO',
|
||||
$log_facility = 'LOG_LOCAL2',
|
||||
) inherits ::swift::params {
|
||||
|
||||
include ::swift::deps
|
||||
@ -127,6 +137,8 @@ class swift::objectexpirer(
|
||||
'object-expirer/reclaim_age': value => $reclaim_age;
|
||||
'object-expirer/recon_cache_path': value => $recon_cache_path;
|
||||
'object-expirer/report_interval': value => $report_interval;
|
||||
'object-expirer/log_facility': value => $log_facility;
|
||||
'object-expirer/log_level': value => $log_level;
|
||||
}
|
||||
|
||||
if $manage_service {
|
||||
|
@ -16,6 +16,8 @@ describe 'swift::objectexpirer' do
|
||||
:reclaim_age => 604800,
|
||||
:recon_cache_path => '/var/cache/swift',
|
||||
:report_interval => 300,
|
||||
:log_facility => 'LOG_LOCAL2',
|
||||
:log_level => 'INFO',
|
||||
:memcache_servers => ['127.0.0.1:11211'] }
|
||||
end
|
||||
|
||||
@ -52,6 +54,10 @@ describe 'swift::objectexpirer' do
|
||||
'object-expirer/recon_cache_path').with_value(p[:recon_cache_path])
|
||||
is_expected.to contain_swift_object_expirer_config(
|
||||
'object-expirer/report_interval').with_value(p[:report_interval])
|
||||
is_expected.to contain_swift_object_expirer_config(
|
||||
'object-expirer/log_level').with_value(p[:log_level])
|
||||
is_expected.to contain_swift_object_expirer_config(
|
||||
'object-expirer/log_facility').with_value(p[:log_facility])
|
||||
end
|
||||
|
||||
it 'configures object-expirer service' do
|
||||
|
Loading…
x
Reference in New Issue
Block a user