Merge "Drop hard-coded log_file"

This commit is contained in:
Zuul 2024-09-23 18:24:51 +00:00 committed by Gerrit Code Review
commit 905e7d58e0
3 changed files with 9 additions and 3 deletions

View File

@ -35,7 +35,7 @@
#
# [*log_file*]
# (Optional) File where logs should be stored.
# Defaults to '/var/log/watcher/watcher.log'
# Defaults to $facts['os_service_default']
#
# [*logging_context_format_string*]
# (Optional) Format string to use for log messages with context.
@ -114,7 +114,7 @@ class watcher::logging(
$use_stderr = $facts['os_service_default'],
$syslog_log_facility = $facts['os_service_default'],
$log_dir = '/var/log/watcher',
$log_file = '/var/log/watcher/watcher.log',
$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'],

View File

@ -0,0 +1,6 @@
---
fixes:
- |
The ``watcher::logging::log_file`` now defaults to the os_service_default
fact so that log file name is determined automatically accoridng to
the process names.

View File

@ -66,7 +66,7 @@ describe 'watcher::logging' do
:use_stderr => '<SERVICE DEFAULT>',
:syslog_log_facility => '<SERVICE DEFAULT>',
:log_dir => '/var/log/watcher',
:log_file => '/var/log/watcher/watcher.log',
:log_file => '<SERVICE DEFAULT>',
:debug => '<SERVICE DEFAULT>',
)
end