Fix #1127 -- Set loglevel from configfile (#1777)

This commit is contained in:
Nils Schneider
2020-09-22 17:40:56 +02:00
committed by GitHub
parent a76f74b161
commit 2f8baecd68
2 changed files with 4 additions and 1 deletions

View File

@@ -97,6 +97,9 @@ Example::
``csp_log``
Log violations of the Content Security Policy (CSP). Defaults to ``on``.
``loglevel``
Set console and file loglevel (``DEBUG``, ``INFO``, ``WARNING``, ``ERROR`` or ``CRITICAL``). Defaults to ``INFO``.
Locale settings
---------------

View File

@@ -561,7 +561,7 @@ MESSAGE_TAGS = {
}
MESSAGE_STORAGE = 'django.contrib.messages.storage.session.SessionStorage'
loglevel = 'DEBUG' if DEBUG else 'INFO'
loglevel = 'DEBUG' if DEBUG else config.get('pretix', 'loglevel', fallback='INFO')
LOGGING = {
'version': 1,