Revert "Deprecate use_syslog"

This option is not deprecated and still actual.

This reverts commit f43e907fa8.

Change-Id: I9e9e0d303dc7516f66013673a0ba960705a3f115
This commit is contained in:
Denis Egorenko
2016-05-31 13:41:44 +00:00
parent f43e907fa8
commit 0a31dca459
4 changed files with 15 additions and 22 deletions

View File

@@ -174,6 +174,10 @@
# (optional) Set log output to debug output.
# Defaults to undef
#
# [*use_syslog*]
# (optional) Use syslog for logging
# Defaults to undef
#
# [*use_stderr*]
# (optional) Use stderr for logging
# Defaults to undef
@@ -233,10 +237,6 @@
# (optional) Deprecated. Set log output to verbose output.
# Defaults to undef
#
# [*use_syslog*]
# (optional) DEPRECATED. Use syslog for logging
# Defaults to undef
#
class aodh (
$ensure_package = 'present',
$alarm_history_time_to_live = $::os_service_default,
@@ -275,6 +275,7 @@ class aodh (
$amqp_username = $::os_service_default,
$amqp_password = $::os_service_default,
$debug = undef,
$use_syslog = undef,
$use_stderr = undef,
$log_facility = undef,
$log_dir = undef,
@@ -291,7 +292,6 @@ class aodh (
$gnocchi_url = $::os_service_default,
# DEPRECATED PARAMETERS
$verbose = undef,
$use_syslog = undef,
) inherits aodh::params {
include ::aodh::db
@@ -307,10 +307,6 @@ class aodh (
warning('verbose is deprecated, has no effect and will be removed after Newton cycle.')
}
if $use_syslog {
warning('use_syslog is deprecated, has no effect and will be removed in a future release')
}
if $rpc_backend == 'rabbit' {
oslo::messaging::rabbit { 'aodh_config':
rabbit_userid => $rabbit_userid,

View File

@@ -8,6 +8,10 @@
# (Optional) Should the daemons log debug messages
# Defaults to $::os_service_default
#
# [*use_syslog*]
# (Optional) Use syslog for logging.
# Defaults to $::os_service_default
#
# [*use_stderr*]
# (optional) Use stderr for logging
# Defaults to $::os_service_default
@@ -88,11 +92,8 @@
# (Optional) Deprecated. Should the daemons log verbose messages
# Defaults to undef
#
# [*use_syslog*]
# (Optional) Deprecated. Use syslog for logging.
# Defaults to undef
#
class aodh::logging(
$use_syslog = $::os_service_default,
$use_stderr = $::os_service_default,
$log_facility = $::os_service_default,
$log_dir = '/var/log/aodh',
@@ -110,19 +111,15 @@ class aodh::logging(
$log_date_format = $::os_service_default,
# DEPRECATED PARAMETERS
$verbose = undef,
$use_syslog = undef,
) {
if $verbose {
warning('verbose is deprecated, has no effect and will be removed after Newton cycle.')
}
if $use_syslog {
warning('use_syslog is deprecated, has no effect and will be removed in a future release.')
}
# NOTE(spredzy): In order to keep backward compatibility we rely on the pick function
# to use aodh::<myparam> first then aodh::logging::<myparam>.
$use_syslog_real = pick($::aodh::use_syslog,$use_syslog)
$use_stderr_real = pick($::aodh::use_stderr,$use_stderr)
$log_facility_real = pick($::aodh::log_facility,$log_facility)
$log_dir_real = pick($::aodh::log_dir,$log_dir)
@@ -130,6 +127,7 @@ class aodh::logging(
oslo::log { 'aodh_config':
debug => $debug_real,
use_syslog => $use_syslog_real,
use_stderr => $use_stderr_real,
log_dir => $log_dir_real,
syslog_log_facility => $log_facility_real,

View File

@@ -1,4 +0,0 @@
---
deprecations:
- use_syslog in DEFAULT section was deprecated in Mitaka, this parameter
has no effect and will be removed in a future release.

View File

@@ -23,6 +23,7 @@ describe 'aodh::logging' do
:instance_format => '[instance: %(uuid)s] ',
:instance_uuid_format => '[instance: %(uuid)s] ',
:log_date_format => '%Y-%m-%d %H:%M:%S',
:use_syslog => true,
:use_stderr => false,
:log_facility => 'LOG_FOO',
:log_dir => '/var/log',
@@ -54,6 +55,7 @@ describe 'aodh::logging' do
shared_examples 'basic default logging settings' do
it 'configures aodh logging settings with default values' do
is_expected.to contain_aodh_config('DEFAULT/use_syslog').with(:value => '<SERVICE DEFAULT>')
is_expected.to contain_aodh_config('DEFAULT/use_stderr').with(:value => '<SERVICE DEFAULT>')
is_expected.to contain_aodh_config('DEFAULT/syslog_log_facility').with(:value => '<SERVICE DEFAULT>')
is_expected.to contain_aodh_config('DEFAULT/log_dir').with(:value => '/var/log/aodh')
@@ -63,6 +65,7 @@ describe 'aodh::logging' do
shared_examples 'basic non-default logging settings' do
it 'configures aodh logging settins with non-default values' do
is_expected.to contain_aodh_config('DEFAULT/use_syslog').with(:value => 'true')
is_expected.to contain_aodh_config('DEFAULT/use_stderr').with(:value => 'false')
is_expected.to contain_aodh_config('DEFAULT/syslog_log_facility').with(:value => 'LOG_FOO')
is_expected.to contain_aodh_config('DEFAULT/log_dir').with(:value => '/var/log')