Browse Source

Update olso.log parameters

Update oslo.log parameters so we don't have warnings in syslog.

Co-Authored-By: Mykyta Karpin <mkarpin@mirantis.com>
Co-Authored-By: Alex Schultz <aschultz@redhat.com>
Change-Id: Ifddb5f6eb964e51e01430a3e915495dd20d0a641
changes/45/444345/6
Mykyta Karpin 5 years ago committed by Alex Schultz
parent
commit
2c50339a0b
  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