Browse Source

Revert "Update olso.log parameters"

The log result is [1] when the option is log-file.
The log result is [2] when the option is log_file.

[1]http://logs.openstack.org/45/444345/6/check/puppet-openstack-integration-4-scenario003-tempest-centos-7/ed001dd/logs/trove/
[2]http://logs.openstack.org/37/534537/1/check/puppet-openstack-integration-4-scenario003-tempest-centos-7/8fbeae3/logs/trove/

This reverts commit 2c50339a0b.

Change-Id: Ib63ea1783c2f85223b703166013cb817c799fc5a
changes/29/534629/1
zhongshengping 4 years ago
parent
commit
3d818422ff
  1. 18
      manifests/log.pp
  2. 36
      spec/defines/oslo_log_spec.rb

18
manifests/log.pp

@ -151,15 +151,15 @@ define oslo::log(
$log_options = {
'DEFAULT/debug' => { value => $debug_real },
'DEFAULT/log-config-append' => { value => $log_config_append },
'DEFAULT/log-date-format' => { value => $log_date_format },
'DEFAULT/log-file' => { value => $log_file },
'DEFAULT/log-dir' => { value => $log_dir },
'DEFAULT/watch-log-file' => { value => $watch_log_file },
'DEFAULT/use-syslog' => { value => $use_syslog },
'DEFAULT/use-journal' => { value => $use_journal },
'DEFAULT/use-json' => { value => $use_json },
'DEFAULT/syslog-log-facility' => { value => $syslog_log_facility },
'DEFAULT/log_config_append' => { value => $log_config_append },
'DEFAULT/log_date_format' => { value => $log_date_format },
'DEFAULT/log_file' => { value => $log_file },
'DEFAULT/log_dir' => { value => $log_dir },
'DEFAULT/watch_log_file' => { value => $watch_log_file },
'DEFAULT/use_syslog' => { value => $use_syslog },
'DEFAULT/use_journal' => { value => $use_journal },
'DEFAULT/use_json' => { value => $use_json },
'DEFAULT/syslog_log_facility' => { value => $syslog_log_facility },
'DEFAULT/use_stderr' => { value => $use_stderr },
'DEFAULT/logging_context_format_string' => { value => $logging_context_format_string },
'DEFAULT/logging_default_format_string' => { value => $logging_default_format_string },

36
spec/defines/oslo_log_spec.rb

@ -9,15 +9,15 @@ describe 'oslo::log' do
context 'with default parameters' do
it 'configure oslo_log default params' do
is_expected.to contain_keystone_config('DEFAULT/debug').with_value('<SERVICE DEFAULT>')
is_expected.to contain_keystone_config('DEFAULT/log-config-append').with_value('<SERVICE DEFAULT>')
is_expected.to contain_keystone_config('DEFAULT/log-date-format').with_value('<SERVICE DEFAULT>')
is_expected.to contain_keystone_config('DEFAULT/log-file').with_value('<SERVICE DEFAULT>')
is_expected.to contain_keystone_config('DEFAULT/log-dir').with_value('<SERVICE DEFAULT>')
is_expected.to contain_keystone_config('DEFAULT/watch-log-file').with_value('<SERVICE DEFAULT>')
is_expected.to contain_keystone_config('DEFAULT/use-syslog').with_value('<SERVICE DEFAULT>')
is_expected.to contain_keystone_config('DEFAULT/use-journal').with_value('<SERVICE DEFAULT>')
is_expected.to contain_keystone_config('DEFAULT/use-json').with_value('<SERVICE DEFAULT>')
is_expected.to contain_keystone_config('DEFAULT/syslog-log-facility').with_value('<SERVICE DEFAULT>')
is_expected.to contain_keystone_config('DEFAULT/log_config_append').with_value('<SERVICE DEFAULT>')
is_expected.to contain_keystone_config('DEFAULT/log_date_format').with_value('<SERVICE DEFAULT>')
is_expected.to contain_keystone_config('DEFAULT/log_file').with_value('<SERVICE DEFAULT>')
is_expected.to contain_keystone_config('DEFAULT/log_dir').with_value('<SERVICE DEFAULT>')
is_expected.to contain_keystone_config('DEFAULT/watch_log_file').with_value('<SERVICE DEFAULT>')
is_expected.to contain_keystone_config('DEFAULT/use_syslog').with_value('<SERVICE DEFAULT>')
is_expected.to contain_keystone_config('DEFAULT/use_journal').with_value('<SERVICE DEFAULT>')
is_expected.to contain_keystone_config('DEFAULT/use_json').with_value('<SERVICE DEFAULT>')
is_expected.to contain_keystone_config('DEFAULT/syslog_log_facility').with_value('<SERVICE DEFAULT>')
is_expected.to contain_keystone_config('DEFAULT/use_stderr').with_value('<SERVICE DEFAULT>')
is_expected.to contain_keystone_config('DEFAULT/logging_context_format_string').with_value('<SERVICE DEFAULT>')
is_expected.to contain_keystone_config('DEFAULT/logging_default_format_string').with_value('<SERVICE DEFAULT>')
@ -63,15 +63,15 @@ describe 'oslo::log' do
it 'configures logging' do
is_expected.to contain_keystone_config('DEFAULT/debug').with_value(true)
is_expected.to contain_keystone_config('DEFAULT/log-config-append').with_value('/var/log/keystone/keystone.log')
is_expected.to contain_keystone_config('DEFAULT/log-date-format').with_value('%Y-%m-%d %H:%M:%S')
is_expected.to contain_keystone_config('DEFAULT/log-file').with_value('/var/log/keystone/keystone.log')
is_expected.to contain_keystone_config('DEFAULT/log-dir').with_value('/var/log/keystone')
is_expected.to contain_keystone_config('DEFAULT/watch-log-file').with_value(true)
is_expected.to contain_keystone_config('DEFAULT/use-syslog').with_value(true)
is_expected.to contain_keystone_config('DEFAULT/use-journal').with_value(true)
is_expected.to contain_keystone_config('DEFAULT/use-json').with_value(true)
is_expected.to contain_keystone_config('DEFAULT/syslog-log-facility').with_value('LOG_USER')
is_expected.to contain_keystone_config('DEFAULT/log_config_append').with_value('/var/log/keystone/keystone.log')
is_expected.to contain_keystone_config('DEFAULT/log_date_format').with_value('%Y-%m-%d %H:%M:%S')
is_expected.to contain_keystone_config('DEFAULT/log_file').with_value('/var/log/keystone/keystone.log')
is_expected.to contain_keystone_config('DEFAULT/log_dir').with_value('/var/log/keystone')
is_expected.to contain_keystone_config('DEFAULT/watch_log_file').with_value(true)
is_expected.to contain_keystone_config('DEFAULT/use_syslog').with_value(true)
is_expected.to contain_keystone_config('DEFAULT/use_journal').with_value(true)
is_expected.to contain_keystone_config('DEFAULT/use_json').with_value(true)
is_expected.to contain_keystone_config('DEFAULT/syslog_log_facility').with_value('LOG_USER')
is_expected.to contain_keystone_config('DEFAULT/use_stderr').with_value(true)
is_expected.to contain_keystone_config('DEFAULT/logging_context_format_string').with_value(
'%(asctime)s.%(msecs)03d %(process)d %(levelname)s %(name)s [%(request_id)s %(user_identity)s] %(instance)s%(message)s')

Loading…
Cancel
Save