From 6fb6ebfaf055f4da878143539de8d9e33c6f42b4 Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Sun, 22 Sep 2024 02:17:55 +0900 Subject: [PATCH] logging: Deprecate watch_log_file This option was deprecated in oslo.log 6.0.0 [1]. Because the warning to catch usage of the parameter is implemented in the underlying oslo::log defined resource type, no additional warning message is implemented in this module. [1] https://review.opendev.org/914788 Depends-on: https://review.opendev.org/930126 Change-Id: I3630f8773977c388c227378b28323be920b78b6a --- manifests/logging.pp | 15 +++++++++------ ...deprecate-watch_log_file-1f04fab3473d5caf.yaml | 4 ++++ spec/classes/zaqar_logging_spec.rb | 1 - 3 files changed, 13 insertions(+), 7 deletions(-) create mode 100644 releasenotes/notes/deprecate-watch_log_file-1f04fab3473d5caf.yaml diff --git a/manifests/logging.pp b/manifests/logging.pp index 06699fe..7b38611 100644 --- a/manifests/logging.pp +++ b/manifests/logging.pp @@ -37,10 +37,6 @@ # (Optional) File where logs should be stored. # Defaults to $facts['os_service_default'] # -# [*watch_log_file*] -# (Optional) Uses logging handler designed to watch file system (boolean value). -# Defaults to $facts['os_service_default'] -# # [*logging_context_format_string*] # (Optional) Format string to use for log messages with context. # Defaults to $facts['os_service_default']. @@ -99,12 +95,18 @@ # it like this (string value). # Defaults to $facts['os_service_default']. # Example: instance_uuid_format='[instance: %(uuid)s] ' - +# # [*log_date_format*] # (Optional) Format string for %%(asctime)s in log records. # Defaults to $facts['os_service_default']. # Example: 'Y-%m-%d %H:%M:%S' # +# DEPRECATED PARAMETERS +# +# [*watch_log_file*] +# (Optional) Uses logging handler designed to watch file system (boolean value). +# Defaults to $facts['os_service_default'] +# class zaqar::logging( $use_syslog = $facts['os_service_default'], $use_json = $facts['os_service_default'], @@ -113,7 +115,6 @@ class zaqar::logging( $log_facility = $facts['os_service_default'], $log_dir = '/var/log/zaqar', $log_file = $facts['os_service_default'], - $watch_log_file = $facts['os_service_default'], $debug = $facts['os_service_default'], $logging_context_format_string = $facts['os_service_default'], $logging_default_format_string = $facts['os_service_default'], @@ -126,6 +127,8 @@ class zaqar::logging( $instance_format = $facts['os_service_default'], $instance_uuid_format = $facts['os_service_default'], $log_date_format = $facts['os_service_default'], + # DEPRECATED PARAMETERS + $watch_log_file = undef, ) { include zaqar::deps diff --git a/releasenotes/notes/deprecate-watch_log_file-1f04fab3473d5caf.yaml b/releasenotes/notes/deprecate-watch_log_file-1f04fab3473d5caf.yaml new file mode 100644 index 0000000..e9e3513 --- /dev/null +++ b/releasenotes/notes/deprecate-watch_log_file-1f04fab3473d5caf.yaml @@ -0,0 +1,4 @@ +--- +deprecations: + - | + The ``zaqar::logging::watch_log_file`` parameter has been deprecated. diff --git a/spec/classes/zaqar_logging_spec.rb b/spec/classes/zaqar_logging_spec.rb index e9212d8..e0a2c95 100644 --- a/spec/classes/zaqar_logging_spec.rb +++ b/spec/classes/zaqar_logging_spec.rb @@ -57,7 +57,6 @@ describe 'zaqar::logging' do :use_stderr => '', :log_dir => '/var/log/zaqar', :log_file => '', - :watch_log_file => '', :debug => '', ) end