Browse Source

Add log_file parameter

Change-Id: Ib4c8bc9d75317c742ee845db889ce5cd07041144
Closes-Bug: #1819417
changes/31/642631/2
ZhongShengping 3 years ago
parent
commit
6390054934
  1. 6
      manifests/logging.pp
  2. 4
      releasenotes/notes/add-log_file-for-logging-9f5ac25cdd1d59cb.yaml
  3. 3
      spec/classes/aodh_logging_spec.rb

6
manifests/logging.pp

@ -34,6 +34,10 @@
# any directory.
# Defaults to '/var/log/aodh'.
#
# [*log_file*]
# (Optional) File where logs should be stored.
# Defaults to $::os_service_default
#
# [*logging_context_format_string*]
# (Optional) Format string to use for log messages with context.
# Defaults to $::os_service_default
@ -101,6 +105,7 @@ class aodh::logging(
$use_stderr = $::os_service_default,
$log_facility = $::os_service_default,
$log_dir = '/var/log/aodh',
$log_file = $::os_service_default,
$debug = $::os_service_default,
$logging_context_format_string = $::os_service_default,
$logging_default_format_string = $::os_service_default,
@ -124,6 +129,7 @@ class aodh::logging(
use_journal => $use_journal,
use_stderr => $use_stderr,
log_dir => $log_dir,
log_file => $log_file,
syslog_log_facility => $log_facility,
logging_context_format_string => $logging_context_format_string,
logging_default_format_string => $logging_default_format_string,

4
releasenotes/notes/add-log_file-for-logging-9f5ac25cdd1d59cb.yaml

@ -0,0 +1,4 @@
---
features:
- |
Add the log_file option for logging.

3
spec/classes/aodh_logging_spec.rb

@ -29,6 +29,7 @@ describe 'aodh::logging' do
:use_stderr => false,
:log_facility => 'LOG_FOO',
:log_dir => '/var/log',
:log_file => '/var/log/aodh/aodh.log',
:debug => true,
}
end
@ -64,6 +65,7 @@ describe 'aodh::logging' do
:use_stderr => '<SERVICE DEFAULT>',
:syslog_log_facility => '<SERVICE DEFAULT>',
:log_dir => '/var/log/aodh',
:log_file => '<SERVICE DEFAULT>',
:debug => '<SERVICE DEFAULT>',
)
end
@ -78,6 +80,7 @@ describe 'aodh::logging' do
:use_stderr => false,
:syslog_log_facility => 'LOG_FOO',
:log_dir => '/var/log',
:log_file => '/var/log/aodh/aodh.log',
:debug => true,
)
end

Loading…
Cancel
Save