]> review.fuel-infra Code Review - puppet-modules/puppet-ceilometer.git/commitdiff
Add watch_log_file option
authorZhongShengping <chdzsp@163.com>
Tue, 14 Sep 2021 08:02:08 +0000 (16:02 +0800)
committerZhongShengping <chdzsp@163.com>
Tue, 14 Sep 2021 08:02:08 +0000 (16:02 +0800)
Add support for Using logging handler designed to watch file system.

Change-Id: I0ac91a77a1809ee851821bd6f52a43cc6fda890b
Closes-Bug: #1943212

manifests/logging.pp
releasenotes/notes/add_watch_log_file-option-add0360c545882f4.yaml [new file with mode: 0644]
spec/classes/ceilometer_logging_spec.rb

index 6c93acfb86feba14d60c2fc69efdef3a4384af40..80809c0eff31de63dee90b243350062129d74dfa 100644 (file)
 #   (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 ceilometer::logging(
   $log_facility                  = $::os_service_default,
   $log_dir                       = '/var/log/ceilometer',
   $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,
@@ -129,6 +134,7 @@ class ceilometer::logging(
     use_journal                   => $use_journal,
     log_dir                       => $log_dir,
     log_file                      => $log_file,
+    watch_log_file                => $watch_log_file,
     syslog_log_facility           => $log_facility,
     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-add0360c545882f4.yaml b/releasenotes/notes/add_watch_log_file-option-add0360c545882f4.yaml
new file mode 100644 (file)
index 0000000..357fe68
--- /dev/null
@@ -0,0 +1,4 @@
+---
+features:
+  - |
+    The new ``ceilometer::logging::watch_log_file`` parameter has been added.
index 3f0fcd2afead83f6c7a2d9b2ec88a6ec50efc06c..6ebc2a1cc845fc39b5cb90bbdd7d4e96fe065008 100644 (file)
@@ -30,6 +30,7 @@ describe 'ceilometer::logging' do
      :log_facility                   => 'LOG_FOO',
      :log_dir                        => '/var/log',
      :log_file                       => '/var/log/ceilometer/ceilometer.log',
+     :watch_log_file                 => true,
      :debug                          => true,
     }
   end
@@ -66,6 +67,7 @@ describe 'ceilometer::logging' do
         :syslog_log_facility => '<SERVICE DEFAULT>',
         :log_dir             => '/var/log/ceilometer',
         :log_file            => '<SERVICE DEFAULT>',
+        :watch_log_file      => '<SERVICE DEFAULT>',
         :debug               => '<SERVICE DEFAULT>',
       )
     end
@@ -81,6 +83,7 @@ describe 'ceilometer::logging' do
         :syslog_log_facility => 'LOG_FOO',
         :log_dir             => '/var/log',
         :log_file            => '/var/log/ceilometer/ceilometer.log',
+        :watch_log_file      => true,
         :debug               => true,
       )
     end