diff --git a/manifests/logging.pp b/manifests/logging.pp index b80a9ae..d036335 100644 --- a/manifests/logging.pp +++ b/manifests/logging.pp @@ -37,6 +37,10 @@ # (Optional) File where logs should be stored. # Defaults to '/var/log/tacker/tacker.log' # +# [*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 @@ -109,6 +113,7 @@ class tacker::logging( $syslog_log_facility = $::os_service_default, $log_dir = '/var/log/tacker', $log_file = '/var/log/tacker/tacker.log', + $watch_log_file = $::os_service_default, $debug = $::os_service_default, $logging_context_format_string = $::os_service_default, $logging_default_format_string = $::os_service_default, @@ -132,6 +137,7 @@ class tacker::logging( use_journal => $use_journal, log_dir => $log_dir, log_file => $log_file, + watch_log_file => $watch_log_file, debug => $debug, logging_context_format_string => $logging_context_format_string, logging_default_format_string => $logging_default_format_string, diff --git a/releasenotes/notes/add_watch_log_file-option-bee1ac47cbf9a5bc.yaml b/releasenotes/notes/add_watch_log_file-option-bee1ac47cbf9a5bc.yaml new file mode 100644 index 0000000..2e46c92 --- /dev/null +++ b/releasenotes/notes/add_watch_log_file-option-bee1ac47cbf9a5bc.yaml @@ -0,0 +1,4 @@ +--- +features: + - | + The new ``tacker::logging::watch_log_file`` parameter has been added. diff --git a/spec/classes/tacker_logging_spec.rb b/spec/classes/tacker_logging_spec.rb index 2daaa32..cbb9112 100644 --- a/spec/classes/tacker_logging_spec.rb +++ b/spec/classes/tacker_logging_spec.rb @@ -30,6 +30,7 @@ describe 'tacker::logging' do :syslog_log_facility => 'LOG_FOO', :log_dir => '/var/log', :log_file => '/var/tmp/tacker_random.log', + :watch_log_file => true, :debug => true, } end @@ -66,6 +67,7 @@ describe 'tacker::logging' do :syslog_log_facility => '', :log_dir => '/var/log/tacker', :log_file => '/var/log/tacker/tacker.log', + :watch_log_file => '', :debug => '', ) end @@ -81,6 +83,7 @@ describe 'tacker::logging' do :syslog_log_facility => 'LOG_FOO', :log_dir => '/var/log', :log_file => '/var/tmp/tacker_random.log', + :watch_log_file => true, :debug => true, ) end