Add watch_log_file option
Add support for Using logging handler designed to watch file system. Change-Id: I3e9479610eb3ff02cd08afefd4b6e411f8fd2812 Closes-Bug: #1943212
This commit is contained in:
parent
b2852e77dd
commit
17078f0478
@ -37,6 +37,10 @@
|
|||||||
# (Optional) File where logs should be stored.
|
# (Optional) File where logs should be stored.
|
||||||
# Defaults to $::os_service_default
|
# 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*]
|
# [*logging_context_format_string*]
|
||||||
# (Optional) Format string to use for log messages with context.
|
# (Optional) Format string to use for log messages with context.
|
||||||
# Defaults to $::os_service_default.
|
# Defaults to $::os_service_default.
|
||||||
@ -109,6 +113,7 @@ class zaqar::logging(
|
|||||||
$log_facility = $::os_service_default,
|
$log_facility = $::os_service_default,
|
||||||
$log_dir = '/var/log/zaqar',
|
$log_dir = '/var/log/zaqar',
|
||||||
$log_file = $::os_service_default,
|
$log_file = $::os_service_default,
|
||||||
|
$watch_log_file = $::os_service_default,
|
||||||
$debug = $::os_service_default,
|
$debug = $::os_service_default,
|
||||||
$logging_context_format_string = $::os_service_default,
|
$logging_context_format_string = $::os_service_default,
|
||||||
$logging_default_format_string = $::os_service_default,
|
$logging_default_format_string = $::os_service_default,
|
||||||
@ -144,6 +149,7 @@ class zaqar::logging(
|
|||||||
syslog_log_facility => $log_facility,
|
syslog_log_facility => $log_facility,
|
||||||
log_dir => $log_dir,
|
log_dir => $log_dir,
|
||||||
log_file => $log_file,
|
log_file => $log_file,
|
||||||
|
watch_log_file => $watch_log_file,
|
||||||
debug => $debug,
|
debug => $debug,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -0,0 +1,4 @@
|
|||||||
|
---
|
||||||
|
features:
|
||||||
|
- |
|
||||||
|
The new ``zaqar::logging::watch_log_file`` parameter has been added.
|
@ -30,6 +30,7 @@ describe 'zaqar::logging' do
|
|||||||
:log_facility => 'LOG_FOO',
|
:log_facility => 'LOG_FOO',
|
||||||
:log_dir => '/var/log',
|
:log_dir => '/var/log',
|
||||||
:log_file => '/var/log/zaqar.log',
|
:log_file => '/var/log/zaqar.log',
|
||||||
|
:watch_log_file => true,
|
||||||
:debug => true,
|
:debug => true,
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
@ -50,13 +51,14 @@ describe 'zaqar::logging' do
|
|||||||
shared_examples 'basic default logging settings' do
|
shared_examples 'basic default logging settings' do
|
||||||
it 'configures zaqar logging settings with default values' do
|
it 'configures zaqar logging settings with default values' do
|
||||||
is_expected.to contain_oslo__log('zaqar_config').with(
|
is_expected.to contain_oslo__log('zaqar_config').with(
|
||||||
:use_syslog => '<SERVICE DEFAULT>',
|
:use_syslog => '<SERVICE DEFAULT>',
|
||||||
:use_json => '<SERVICE DEFAULT>',
|
:use_json => '<SERVICE DEFAULT>',
|
||||||
:use_journal => '<SERVICE DEFAULT>',
|
:use_journal => '<SERVICE DEFAULT>',
|
||||||
:use_stderr => '<SERVICE DEFAULT>',
|
:use_stderr => '<SERVICE DEFAULT>',
|
||||||
:log_dir => '/var/log/zaqar',
|
:log_dir => '/var/log/zaqar',
|
||||||
:log_file => '<SERVICE DEFAULT>',
|
:log_file => '<SERVICE DEFAULT>',
|
||||||
:debug => '<SERVICE DEFAULT>',
|
:watch_log_file => '<SERVICE DEFAULT>',
|
||||||
|
:debug => '<SERVICE DEFAULT>',
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -71,6 +73,7 @@ describe 'zaqar::logging' do
|
|||||||
:syslog_log_facility => 'LOG_FOO',
|
:syslog_log_facility => 'LOG_FOO',
|
||||||
:log_dir => '/var/log',
|
:log_dir => '/var/log',
|
||||||
:log_file => '/var/log/zaqar.log',
|
:log_file => '/var/log/zaqar.log',
|
||||||
|
:watch_log_file => true,
|
||||||
:debug => true,
|
:debug => true,
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user