diff --git a/manifests/containerreconciler.pp b/manifests/containerreconciler.pp index 21653962..f185e985 100644 --- a/manifests/containerreconciler.pp +++ b/manifests/containerreconciler.pp @@ -87,6 +87,18 @@ # is ignored. # Defaults to $facts['os_service_default'] # +# [*log_name*] +# (optional) Log name. +# Defaults to $facts['os_service_default']. +# +# [*log_level*] +# (optional) Log level. +# Defaults to $facts['os_service_default']. +# +# [*log_facility*] +# (optional) Log level +# Defaults to 'LOG_LOCAL2'. +# # [*purge_config*] # (optional) Whether to set only the specified config options # in the proxy config. @@ -109,6 +121,9 @@ class swift::containerreconciler( $cache_tls_cafile = $facts['os_service_default'], $cache_tls_certfile = $facts['os_service_default'], $cache_tls_keyfile = $facts['os_service_default'], + $log_name = $facts['os_service_default'], + $log_level = 'INFO', + $log_facility = 'LOG_LOCAL2', Boolean $purge_config = false, ) inherits swift::params { @@ -156,6 +171,9 @@ class swift::containerreconciler( 'container-reconciler/processes': value => $processes; 'container-reconciler/reclaim_age': value => $reclaim_age; 'container-reconciler/request_tries': value => $request_tries; + 'container-reconciler/log_name': value => $log_name; + 'container-reconciler/log_facility': value => $log_facility; + 'container-reconciler/log_level': value => $log_level; } if $manage_service { diff --git a/manifests/objectexpirer.pp b/manifests/objectexpirer.pp index 897037fa..23a869fe 100644 --- a/manifests/objectexpirer.pp +++ b/manifests/objectexpirer.pp @@ -93,6 +93,10 @@ # is ignored. # Defaults to $facts['os_service_default']. # +# [*log_name*] +# (optional) Log name. +# Defaults to $facts['os_service_default']. +# # [*log_level*] # (optional) Log level. # Defaults to 'INFO'. @@ -125,6 +129,7 @@ class swift::objectexpirer( $cache_tls_cafile = $facts['os_service_default'], $cache_tls_certfile = $facts['os_service_default'], $cache_tls_keyfile = $facts['os_service_default'], + $log_name = $facts['os_service_default'], $log_level = 'INFO', $log_facility = 'LOG_LOCAL2', Boolean $purge_config = false, @@ -190,6 +195,7 @@ 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_name': value => $log_name; 'object-expirer/log_facility': value => $log_facility; 'object-expirer/log_level': value => $log_level; } diff --git a/releasenotes/notes/more-log-opts-a6cfc6204a7e5d8a.yaml b/releasenotes/notes/more-log-opts-a6cfc6204a7e5d8a.yaml new file mode 100644 index 00000000..9403421b --- /dev/null +++ b/releasenotes/notes/more-log-opts-a6cfc6204a7e5d8a.yaml @@ -0,0 +1,17 @@ +--- +features: + - | + The new ``swift::objectexpirer::log_name`` option has been added. + + - | + The following options have been added to the ``swift::containerreconciler`` + class. + + - ``log_name`` + - ``log_level`` + - ``log_facility`` + +fixes: + - | + container-reconciler is now configured to use the local2 facility by + default. diff --git a/spec/classes/swift_containerreconciler_spec.rb b/spec/classes/swift_containerreconciler_spec.rb index e37e3fcf..cc36667c 100644 --- a/spec/classes/swift_containerreconciler_spec.rb +++ b/spec/classes/swift_containerreconciler_spec.rb @@ -27,6 +27,12 @@ describe 'swift::containerreconciler' do 'container-reconciler/reclaim_age').with_value('') is_expected.to contain_swift_container_reconciler_config( 'container-reconciler/request_tries').with_value('') + is_expected.to contain_swift_container_reconciler_config( + 'container-reconciler/log_name').with_value('') + is_expected.to contain_swift_container_reconciler_config( + 'container-reconciler/log_level').with_value('INFO') + is_expected.to contain_swift_container_reconciler_config( + 'container-reconciler/log_facility').with_value('LOG_LOCAL2') is_expected.to contain_swift_container_reconciler_config( 'filter:cache/memcache_servers').with_value('127.0.0.1:11211') is_expected.to contain_swift_container_reconciler_config( diff --git a/spec/classes/swift_objectexpirer_spec.rb b/spec/classes/swift_objectexpirer_spec.rb index 28c6a052..8da580aa 100644 --- a/spec/classes/swift_objectexpirer_spec.rb +++ b/spec/classes/swift_objectexpirer_spec.rb @@ -31,6 +31,8 @@ describe 'swift::objectexpirer' do 'object-expirer/recon_cache_path').with_value('') is_expected.to contain_swift_object_expirer_config( 'object-expirer/report_interval').with_value('') + is_expected.to contain_swift_object_expirer_config( + 'object-expirer/log_name').with_value('') is_expected.to contain_swift_object_expirer_config( 'object-expirer/log_level').with_value('INFO') is_expected.to contain_swift_object_expirer_config(