Merge "Allow different log level for django module"

This commit is contained in:
Zuul 2022-03-30 03:55:00 +00:00 committed by Gerrit Code Review
commit 3cc6acabd4
3 changed files with 17 additions and 3 deletions

View File

@ -130,8 +130,13 @@
# (optional) Log handlers. Defaults to ['file']
#
# [*log_level*]
# (optional) Log level. Defaults to 'INFO'. WARNING: Setting this to
# DEBUG will let plaintext passwords be logged in the Horizon log file.
# (optional) Log level. WARNING: Setting this to DEBUG will let plaintext
# passwords be logged in the Horizon log file.
# Defaults to 'INFO'
#
# [*django_log_level*]
# (optional) Log level of django module. This overrides log_level.
# Defaults to undef
#
# [*syslog_facility*]
# (optional) Syslog facility used when syslog log hander is enabled.
@ -566,6 +571,7 @@ class horizon(
$dropdown_max_items = 30,
$log_handlers = ['file'],
$log_level = 'INFO',
$django_log_level = undef,
$syslog_facility = 'local1',
$help_url = 'http://docs.openstack.org',
$local_settings_template = 'horizon/local_settings.py.erb',
@ -741,6 +747,8 @@ and usage of a quoted value is deprecated.')
})
}
$django_log_level_real = pick($django_log_level, $log_level)
package { 'horizon':
ensure => $package_ensure,
name => $::horizon::params::package_name,

View File

@ -0,0 +1,6 @@
---
features:
- |
The new ``horizon::django_log_level`` parameter has been added. This
parameter determines log level of the django module and overrides
the global ``log_level`` parameter.

View File

@ -843,7 +843,7 @@ LOGGING = {
# 'handlers': ['console'],
'handlers': ['<%= @log_handlers.join("', '") %>'],
# 'level': 'DEBUG',
'level': '<%= @log_level %>',
'level': '<%= @django_log_level_real %>',
'propagate': False,
},
# Logging from django.db.backends is VERY verbose, send to null