Expose use_json logging option
It enables JSON-formatted logging from oslo.log. Change-Id: I8a7e1d5324abaeda0d06a885c73b11c01ce718da
This commit is contained in:
parent
2f6c873960
commit
aa637da4a6
@ -12,6 +12,10 @@
|
||||
# (optional) Use syslog for logging
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*use_json*]
|
||||
# (optional) Use json for logging
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*use_stderr*]
|
||||
# (optional) Use stderr for logging
|
||||
# Defaults to $::os_service_default
|
||||
@ -100,6 +104,7 @@
|
||||
class neutron::logging (
|
||||
$debug = $::os_service_default,
|
||||
$use_syslog = $::os_service_default,
|
||||
$use_json = $::os_service_default,
|
||||
$use_stderr = $::os_service_default,
|
||||
$log_file = $::os_service_default,
|
||||
$log_dir = '/var/log/neutron',
|
||||
@ -135,6 +140,7 @@ class neutron::logging (
|
||||
debug => $debug_real,
|
||||
use_stderr => $use_stderr_real,
|
||||
use_syslog => $use_syslog_real,
|
||||
use_json => $use_json,
|
||||
syslog_log_facility => $syslog_log_facility,
|
||||
log_file => $log_file_real,
|
||||
log_dir => $log_dir_real,
|
||||
|
4
releasenotes/notes/log-json-682e2dda40061831.yaml
Normal file
4
releasenotes/notes/log-json-682e2dda40061831.yaml
Normal file
@ -0,0 +1,4 @@
|
||||
---
|
||||
features:
|
||||
- |
|
||||
Expose use_json logging parameter, which enables JSON formatted logging.
|
@ -25,6 +25,7 @@ describe 'neutron::logging' do
|
||||
:instance_uuid_format => '[instance: %(uuid)s] ',
|
||||
:log_date_format => '%Y-%m-%d %H:%M:%S',
|
||||
:use_syslog => false,
|
||||
:use_json => false,
|
||||
:use_stderr => false,
|
||||
:syslog_log_facility => 'LOG_USER',
|
||||
:log_dir => '/var/log',
|
||||
@ -56,6 +57,7 @@ describe 'neutron::logging' do
|
||||
it 'configures neutron logging settings with default values' do
|
||||
is_expected.to contain_oslo__log('neutron_config').with(
|
||||
:use_syslog => '<SERVICE DEFAULT>',
|
||||
:use_json => '<SERVICE DEFAULT>',
|
||||
:use_stderr => '<SERVICE DEFAULT>',
|
||||
:syslog_log_facility => '<SERVICE DEFAULT>',
|
||||
:log_dir => '/var/log/neutron',
|
||||
@ -70,6 +72,7 @@ describe 'neutron::logging' do
|
||||
it 'configures neutron logging settings with non-default values' do
|
||||
is_expected.to contain_oslo__log('neutron_config').with(
|
||||
:use_syslog => false,
|
||||
:use_json => false,
|
||||
:use_stderr => false,
|
||||
:syslog_log_facility => 'LOG_USER',
|
||||
:log_dir => '/var/log',
|
||||
|
Loading…
Reference in New Issue
Block a user