[extensions-web/deploy] settings: try to simplify logging configuration
- From: Yuri Konotopov <ykonotopov src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [extensions-web/deploy] settings: try to simplify logging configuration
- Date: Mon, 17 Dec 2018 18:23:54 +0000 (UTC)
commit 794d9c31faa8b924864fd2210e113552a997efb3
Author: Yuri Konotopov <ykonotopov gnome org>
Date: Mon Dec 17 22:23:42 2018 +0400
settings: try to simplify logging configuration
sweettooth/settings.py | 39 ++++++---------------------------------
1 file changed, 6 insertions(+), 33 deletions(-)
---
diff --git a/sweettooth/settings.py b/sweettooth/settings.py
index 322cf4f..7f11db5 100644
--- a/sweettooth/settings.py
+++ b/sweettooth/settings.py
@@ -161,39 +161,12 @@ COMMENTS_APP = 'sweettooth.ratings'
# See http://docs.djangoproject.com/en/dev/topics/logging for
# more details on how to customize your logging configuration.
-LOGGING = {
- 'version': 1,
- 'disable_existing_loggers': False,
- 'filters': {
- 'require_debug_false': {
- '()': 'django.utils.log.RequireDebugFalse'
- }
- },
- 'handlers': {
- 'console': {
- 'level': 'DEBUG',
- 'filters': None,
- 'class': 'logging.StreamHandler',
- },
- 'mail_admins': {
- 'level': 'ERROR',
- 'filters': ['require_debug_false'],
- 'class': 'django.utils.log.AdminEmailHandler'
- }
- },
- 'loggers': {
- 'django': {
- 'handlers': ['console'],
- 'level': os.getenv('EGO_LOG_LEVEL', 'WARN'),
- 'propagate': True,
- },
- 'django.request': {
- 'handlers': ['mail_admins'],
- 'level': 'ERROR',
- 'propagate': True,
- },
- }
-}
+from django.utils.log import DEFAULT_LOGGING as LOGGING
+
+LOGGING["handlers"]["console"]["filters"] = None
+LOGGING["handlers"]["console"]["level"] = "Debug"
+LOGGING["loggers"]["django"]["level"] = os.getenv('EGO_LOG_LEVEL', 'WARN')
+
DEFAULT_FROM_EMAIL = "noreply gnome org"
if os.getenv('EGO_EMAIL_URL'):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]