[extensions-web/deploy] django: added logging to console.
- From: Yuri Konotopov <ykonotopov src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [extensions-web/deploy] django: added logging to console.
- Date: Sat, 15 Dec 2018 09:32:24 +0000 (UTC)
commit 9f1e2f05ec3e1dd52136339ae01e185f14c28bcc
Author: Yuri Konotopov <ykonotopov gnome org>
Date: Sat Dec 15 13:31:58 2018 +0400
django: added logging to console.
sweettooth/settings.py | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
---
diff --git a/sweettooth/settings.py b/sweettooth/settings.py
index 72d7c04..d7cf3ef 100644
--- a/sweettooth/settings.py
+++ b/sweettooth/settings.py
@@ -159,9 +159,6 @@ LOGIN_URL = '/accounts/login/'
COMMENTS_APP = 'sweettooth.ratings'
-# A sample logging configuration. The only tangible logging
-# performed by this configuration is to send an email to
-# the site admins on every HTTP 500 error.
# See http://docs.djangoproject.com/en/dev/topics/logging for
# more details on how to customize your logging configuration.
LOGGING = {
@@ -173,6 +170,11 @@ LOGGING = {
}
},
'handlers': {
+ 'console': {
+ 'level': 'DEBUG',
+ 'filters': None,
+ 'class': 'logging.StreamHandler',
+ },
'mail_admins': {
'level': 'ERROR',
'filters': ['require_debug_false'],
@@ -180,6 +182,11 @@ LOGGING = {
}
},
'loggers': {
+ 'django': {
+ 'handlers': ['console'],
+ 'level': os.getenv('EGO_LOG_LEVEL', 'WARN'),
+ 'propagate': True,
+ },
'django.request': {
'handlers': ['mail_admins'],
'level': 'ERROR',
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]