diff --git a/manifests/logging.pp b/manifests/logging.pp index 24c57adf..5cbc5218 100644 --- a/manifests/logging.pp +++ b/manifests/logging.pp @@ -37,6 +37,10 @@ # (Optional) File where logs should be stored. # Defaults to $::os_service_default # +# [*watch_log_file*] +# (Optional) Uses logging handler designed to watch file system (boolean value). +# Defaults to $::os_service_default +# # [*logging_context_format_string*] # (Optional) Format string to use for log messages with context. # Defaults to $::os_service_default @@ -105,6 +109,7 @@ class heat::logging( $log_facility = $::os_service_default, $log_dir = '/var/log/heat', $log_file = $::os_service_default, + $watch_log_file = $::os_service_default, $debug = $::os_service_default, $logging_context_format_string = $::os_service_default, $logging_default_format_string = $::os_service_default, @@ -127,6 +132,7 @@ class heat::logging( log_date_format => $log_date_format, log_dir => $log_dir, log_file => $log_file, + watch_log_file => $watch_log_file, use_syslog => $use_syslog, use_json => $use_json, use_journal => $use_journal, diff --git a/releasenotes/notes/add_watch_log_file-option-aa4ff24a35c6459b.yaml b/releasenotes/notes/add_watch_log_file-option-aa4ff24a35c6459b.yaml new file mode 100644 index 00000000..7c40384a --- /dev/null +++ b/releasenotes/notes/add_watch_log_file-option-aa4ff24a35c6459b.yaml @@ -0,0 +1,4 @@ +--- +features: + - | + The new ``heat::logging::watch_log_file`` parameter has been added. diff --git a/spec/classes/heat_logging_spec.rb b/spec/classes/heat_logging_spec.rb index 24a7c61c..ba7cd85b 100644 --- a/spec/classes/heat_logging_spec.rb +++ b/spec/classes/heat_logging_spec.rb @@ -30,6 +30,7 @@ describe 'heat::logging' do :log_facility => 'LOG_FOO', :log_dir => '/var/log', :log_file => '/var/log/heat/heat.log', + :watch_log_file => true, :debug => true, } end @@ -59,13 +60,14 @@ describe 'heat::logging' do shared_examples 'basic default logging settings' do it 'configures heat logging settings with default values' do is_expected.to contain_oslo__log('heat_config').with( - :use_syslog => '', - :use_json => '', - :use_journal => '', - :use_stderr => '', - :log_dir => '/var/log/heat', - :log_file => '', - :debug => '', + :use_syslog => '', + :use_json => '', + :use_journal => '', + :use_stderr => '', + :log_dir => '/var/log/heat', + :log_file => '', + :watch_log_file => '', + :debug => '', ) end end @@ -80,6 +82,7 @@ describe 'heat::logging' do :syslog_log_facility => 'LOG_FOO', :log_dir => '/var/log', :log_file => '/var/log/heat/heat.log', + :watch_log_file => true, :debug => true, ) end