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: I357130db1e230013203f58e5397b94fd823e1566
This commit is contained in:
Takashi Kajinami 2024-09-22 01:50:22 +09:00
parent b897bfdcdb
commit 6e02ee902b
3 changed files with 12 additions and 6 deletions

View File

@ -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']
@ -101,6 +97,12 @@
# 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 undef
#
class cinder::logging(
$use_syslog = $facts['os_service_default'],
$use_json = $facts['os_service_default'],
@ -109,7 +111,6 @@ class cinder::logging(
$log_facility = $facts['os_service_default'],
$log_dir = '/var/log/cinder',
$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'],
@ -122,6 +123,8 @@ class cinder::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 cinder::deps

View File

@ -0,0 +1,4 @@
---
deprecations:
- |
The ``cinder::logging::watch_log_file`` parameter has been deprecated.

View File

@ -65,7 +65,6 @@ describe 'cinder::logging' do
:use_stderr => '<SERVICE DEFAULT>',
:log_dir => '/var/log/cinder',
:log_file => '<SERVICE DEFAULT>',
:watch_log_file => '<SERVICE DEFAULT>',
:debug => '<SERVICE DEFAULT>',
)
end