[extensions-web/deploy] Revert "settings: try to simplify logging configuration #2"



commit b929e250744a4e0835af5b1c100a139491f63862
Author: Yuri Konotopov <ykonotopov gnome org>
Date:   Mon Dec 17 22:13:05 2018 +0400

    Revert "settings: try to simplify logging configuration #2"
    
    This reverts commit e469cc00a4df1b8fcca53765a1e4a78713e25e04.
    
    Revert "settings: try to simplify logging configuration"
    
    This reverts commit e3834c12da14fb872cd570fa1c1b9f078c36b703.

 sweettooth/settings.py | 26 +++++++++++++++++++++++---
 1 file changed, 23 insertions(+), 3 deletions(-)
---
diff --git a/sweettooth/settings.py b/sweettooth/settings.py
index 0f88098..322cf4f 100644
--- a/sweettooth/settings.py
+++ b/sweettooth/settings.py
@@ -163,15 +163,35 @@ COMMENTS_APP = 'sweettooth.ratings'
 # 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': {
-            'filters': None
+            'level': 'DEBUG',
+            'filters': None,
+            'class': 'logging.StreamHandler',
+        },
+        'mail_admins': {
+            'level': 'ERROR',
+            'filters': ['require_debug_false'],
+            'class': 'django.utils.log.AdminEmailHandler'
         }
     },
     'loggers': {
         'django': {
-            'level': os.getenv('EGO_LOG_LEVEL', 'WARN')
-        }
+            'handlers': ['console'],
+            'level': os.getenv('EGO_LOG_LEVEL', 'WARN'),
+            'propagate': True,
+        },
+        'django.request': {
+            'handlers': ['mail_admins'],
+            'level': 'ERROR',
+            'propagate': True,
+        },
     }
 }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]