Drop hard-coded log_file
Because the service config file is shared among multiple services, we should not set the option without any specific reason. In case the option is not set (and no --log-file argument is passed) then log file name is determined according to the process name, and each service creates its own file. Change-Id: I65b1abc96be4503d51d8b1af2c4ece7aa52be563
This commit is contained in:
parent
5c99ae753d
commit
7becf0017c
@ -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'],
|
||||
|
@ -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.
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user