Browse Source

Add log_file parameter

Change-Id: I6a21a7b5cfbdb616085bd6e0c73ba201901bc242
Closes-Bug: #1819417
changes/27/642627/1
ZhongShengping 3 years ago
parent
commit
201f379a43
  1. 6
      manifests/logging.pp
  2. 4
      releasenotes/notes/add-log_file-for-logging-be080bb51359db6e.yaml
  3. 3
      spec/classes/ceilometer_logging_spec.rb

6
manifests/logging.pp

@ -33,6 +33,10 @@
# If set to $::os_service_default, it will not log to any directory.
# Defaults to '/var/log/ceilometer'.
#
# [*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.
@ -100,6 +104,7 @@ class ceilometer::logging(
$use_stderr = $::os_service_default,
$log_facility = $::os_service_default,
$log_dir = '/var/log/ceilometer',
$log_file = $::os_service_default,
$debug = $::os_service_default,
$logging_context_format_string = $::os_service_default,
$logging_default_format_string = $::os_service_default,
@ -123,6 +128,7 @@ class ceilometer::logging(
use_json => $use_json,
use_journal => $use_journal,
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-be080bb51359db6e.yaml

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

3
spec/classes/ceilometer_logging_spec.rb

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

Loading…
Cancel
Save