Add log_file parameter
Change-Id: I44588c37da37f915e15471643c528a218794be04 Closes-Bug: #1819417
This commit is contained in:
@@ -33,6 +33,10 @@
|
|||||||
# If set to $::os_service_default, it will not log to any directory.
|
# If set to $::os_service_default, it will not log to any directory.
|
||||||
# Defaults to '/var/log/nova'
|
# Defaults to '/var/log/nova'
|
||||||
#
|
#
|
||||||
|
# [*log_file*]
|
||||||
|
# (Optional) File where logs should be stored.
|
||||||
|
# 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
|
||||||
@@ -100,6 +104,7 @@ class nova::logging(
|
|||||||
$use_stderr = $::os_service_default,
|
$use_stderr = $::os_service_default,
|
||||||
$log_facility = $::os_service_default,
|
$log_facility = $::os_service_default,
|
||||||
$log_dir = '/var/log/nova',
|
$log_dir = '/var/log/nova',
|
||||||
|
$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,
|
||||||
@@ -134,6 +139,7 @@ class nova::logging(
|
|||||||
use_json => $use_json,
|
use_json => $use_json,
|
||||||
use_journal => $use_journal,
|
use_journal => $use_journal,
|
||||||
log_dir => $log_dir,
|
log_dir => $log_dir,
|
||||||
|
log_file => $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:
|
||||||
|
- |
|
||||||
|
Add the log_file option for logging.
|
@@ -29,6 +29,7 @@ describe 'nova::logging' do
|
|||||||
:use_stderr => false,
|
:use_stderr => false,
|
||||||
:log_facility => 'LOG_FOO',
|
:log_facility => 'LOG_FOO',
|
||||||
:log_dir => '/var/log/foo',
|
:log_dir => '/var/log/foo',
|
||||||
|
:log_file => '/var/log/foo/nova.log',
|
||||||
:debug => true,
|
:debug => true,
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
@@ -63,6 +64,7 @@ describe 'nova::logging' do
|
|||||||
:use_journal => '<SERVICE DEFAULT>',
|
:use_journal => '<SERVICE DEFAULT>',
|
||||||
:use_stderr => '<SERVICE DEFAULT>',
|
:use_stderr => '<SERVICE DEFAULT>',
|
||||||
:log_dir => '/var/log/nova',
|
:log_dir => '/var/log/nova',
|
||||||
|
:log_file => '<SERVICE DEFAULT>',
|
||||||
:debug => '<SERVICE DEFAULT>',
|
:debug => '<SERVICE DEFAULT>',
|
||||||
)
|
)
|
||||||
is_expected.to contain_file('/var/log/nova/nova-manage.log').with(
|
is_expected.to contain_file('/var/log/nova/nova-manage.log').with(
|
||||||
@@ -80,6 +82,7 @@ describe 'nova::logging' do
|
|||||||
:use_stderr => false,
|
:use_stderr => false,
|
||||||
:syslog_log_facility => 'LOG_FOO',
|
:syslog_log_facility => 'LOG_FOO',
|
||||||
:log_dir => '/var/log/foo',
|
:log_dir => '/var/log/foo',
|
||||||
|
:log_file => '/var/log/foo/nova.log',
|
||||||
:debug => true,
|
:debug => true,
|
||||||
)
|
)
|
||||||
is_expected.to contain_file('/var/log/foo/nova-manage.log').with(
|
is_expected.to contain_file('/var/log/foo/nova-manage.log').with(
|
||||||
|
Reference in New Issue
Block a user