Add watch_log_file option
Add support for Using logging handler designed to watch file system. Change-Id: I703cd1bccea8e14da5c228de02a341b0f6e9bc46 Closes-Bug: #1943212
This commit is contained in:
@@ -37,6 +37,11 @@
|
|||||||
# (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 +114,7 @@ class barbican::api::logging(
|
|||||||
$log_facility = $::os_service_default,
|
$log_facility = $::os_service_default,
|
||||||
$log_dir = '/var/log/barbican',
|
$log_dir = '/var/log/barbican',
|
||||||
$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,
|
||||||
@@ -133,6 +139,7 @@ class barbican::api::logging(
|
|||||||
use_stderr => $use_stderr,
|
use_stderr => $use_stderr,
|
||||||
log_dir => $log_dir,
|
log_dir => $log_dir,
|
||||||
log_file => $log_file,
|
log_file => $log_file,
|
||||||
|
watch_log_file => $watch_log_file,
|
||||||
syslog_log_facility => $log_facility,
|
syslog_log_facility => $log_facility,
|
||||||
logging_context_format_string => $logging_context_format_string,
|
logging_context_format_string => $logging_context_format_string,
|
||||||
logging_default_format_string => $logging_default_format_string,
|
logging_default_format_string => $logging_default_format_string,
|
||||||
|
@@ -0,0 +1,4 @@
|
|||||||
|
---
|
||||||
|
features:
|
||||||
|
- |
|
||||||
|
The new ``barbican::logging::watch_log_file`` parameter has been added.
|
@@ -49,6 +49,7 @@ describe 'barbican::api::logging' do
|
|||||||
:log_facility => 'LOG_FOO',
|
:log_facility => 'LOG_FOO',
|
||||||
:log_dir => '/var/log',
|
:log_dir => '/var/log',
|
||||||
:log_file => '/var/tmp/barbican_random.log',
|
:log_file => '/var/tmp/barbican_random.log',
|
||||||
|
:watch_log_file => true,
|
||||||
:debug => true,
|
:debug => true,
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
@@ -85,6 +86,7 @@ describe 'barbican::api::logging' do
|
|||||||
:syslog_log_facility => '<SERVICE DEFAULT>',
|
:syslog_log_facility => '<SERVICE DEFAULT>',
|
||||||
:log_dir => '/var/log/barbican',
|
:log_dir => '/var/log/barbican',
|
||||||
:log_file => '<SERVICE DEFAULT>',
|
:log_file => '<SERVICE DEFAULT>',
|
||||||
|
:watch_log_file => '<SERVICE DEFAULT>',
|
||||||
:debug => '<SERVICE DEFAULT>',
|
:debug => '<SERVICE DEFAULT>',
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
@@ -100,6 +102,7 @@ describe 'barbican::api::logging' do
|
|||||||
:syslog_log_facility => 'LOG_FOO',
|
:syslog_log_facility => 'LOG_FOO',
|
||||||
:log_dir => '/var/log',
|
:log_dir => '/var/log',
|
||||||
:log_file => '/var/tmp/barbican_random.log',
|
:log_file => '/var/tmp/barbican_random.log',
|
||||||
|
:watch_log_file => true,
|
||||||
:debug => true,
|
:debug => true,
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
@@ -133,7 +136,7 @@ describe 'barbican::api::logging' do
|
|||||||
:log_config_append, :publish_errors,
|
:log_config_append, :publish_errors,
|
||||||
:default_log_levels, :fatal_deprecations,
|
:default_log_levels, :fatal_deprecations,
|
||||||
:instance_format, :instance_uuid_format,
|
:instance_format, :instance_uuid_format,
|
||||||
:log_date_format, :log_file ].each { |param|
|
:log_date_format, :log_file, :watch_log_file ].each { |param|
|
||||||
it { is_expected.to contain_oslo__log('barbican_config').with("#{param}" => '<SERVICE DEFAULT>') }
|
it { is_expected.to contain_oslo__log('barbican_config').with("#{param}" => '<SERVICE DEFAULT>') }
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
Reference in New Issue
Block a user