From 5279fddb2fa3a6878ad4ba4bd7f32cbc213d9fad Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 26 Jul 2019 14:57:19 +0700 Subject: [PATCH] add logging info --- .gitignore | 1 + landcoverportal/settings_example.py | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/.gitignore b/.gitignore index 54e3bcf..df8e4dc 100644 --- a/.gitignore +++ b/.gitignore @@ -12,6 +12,7 @@ static/* # Exception to the rule !static/README.md landcoverportal/settings.py +debug.log # Eclipse project files # ====================== diff --git a/landcoverportal/settings_example.py b/landcoverportal/settings_example.py index 3daeb27..49882a5 100644 --- a/landcoverportal/settings_example.py +++ b/landcoverportal/settings_example.py @@ -187,6 +187,25 @@ 'oauth2client.contrib.django_util' ) +LOGGING = { + 'version': 1, + 'disable_existing_loggers': False, + 'handlers': { + 'file': { + 'level': 'WARNING',#'DEBUG', + 'class': 'logging.FileHandler', + 'filename': os.path.join(BASE_DIR, 'debug.log') + }, + }, + 'loggers': { + 'django': { + 'handlers': ['file'], + 'level': 'WARNING', + 'propagate': True, + }, + }, +} + LANGUAGES = ( ## Customize this ('en', gettext('en')),