Add use_journal option for logging configuration
This enables oslo.log to pass logging records to journald. Change-Id: I9978675c582170426477a701355e7d3094348bbd
This commit is contained in:
parent
cb727ddd9c
commit
ebf8d26a41
@ -16,6 +16,10 @@
|
||||
# (Optional) Use json for logging.
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*use_journal*]
|
||||
# (Optional) Use journal for logging.
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*use_stderr*]
|
||||
# (optional) Use stderr for logging
|
||||
# Defaults to $::os_service_default
|
||||
@ -100,6 +104,7 @@
|
||||
class panko::logging(
|
||||
$use_syslog = $::os_service_default,
|
||||
$use_json = $::os_service_default,
|
||||
$use_journal = $::os_service_default,
|
||||
$use_stderr = $::os_service_default,
|
||||
$syslog_log_facility = $::os_service_default,
|
||||
$log_dir = '/var/log/panko',
|
||||
@ -124,6 +129,7 @@ class panko::logging(
|
||||
use_stderr => $use_stderr,
|
||||
use_syslog => $use_syslog,
|
||||
use_json => $use_json,
|
||||
use_journal => $use_journal,
|
||||
log_dir => $log_dir,
|
||||
log_file => $log_file,
|
||||
debug => $debug,
|
||||
|
@ -0,0 +1,5 @@
|
||||
---
|
||||
features:
|
||||
- |
|
||||
Adds the use_journal option for configuring oslo.log. This will enable
|
||||
passing the logs to journald.
|
@ -25,6 +25,7 @@ describe 'panko::logging' do
|
||||
:log_date_format => '%Y-%m-%d %H:%M:%S',
|
||||
:use_syslog => true,
|
||||
:use_json => true,
|
||||
:use_journal => true,
|
||||
:use_stderr => false,
|
||||
:syslog_log_facility => 'LOG_FOO',
|
||||
:log_dir => '/var/log',
|
||||
@ -60,6 +61,7 @@ describe 'panko::logging' do
|
||||
is_expected.to contain_oslo__log('panko_config').with(
|
||||
:use_syslog => '<SERVICE DEFAULT>',
|
||||
:use_json => '<SERVICE DEFAULT>',
|
||||
:use_journal => '<SERVICE DEFAULT>',
|
||||
:use_stderr => '<SERVICE DEFAULT>',
|
||||
:syslog_log_facility => '<SERVICE DEFAULT>',
|
||||
:log_dir => '/var/log/panko',
|
||||
@ -74,6 +76,7 @@ describe 'panko::logging' do
|
||||
is_expected.to contain_oslo__log('panko_config').with(
|
||||
:use_syslog => true,
|
||||
:use_json => true,
|
||||
:use_journal => true,
|
||||
:use_stderr => false,
|
||||
:syslog_log_facility => 'LOG_FOO',
|
||||
:log_dir => '/var/log',
|
||||
|
Loading…
Reference in New Issue
Block a user