Debug log moved to Home by default

...Vittusaatana...
This commit is contained in:
Aarni
2016-12-10 19:17:52 +02:00
parent c9de8e2f8e
commit 23132386bb
3 changed files with 4 additions and 2 deletions
+1 -1
View File
@@ -13,7 +13,7 @@ import logging
#Logger function, you can use the same idea when implementing other loggers to other apps
memberlogger = logging.getLogger(__name__)
logging.basicConfig(format='[%(levelname)s]%(asctime)s %(message)s', level=settings.LOGGERLEVEL, filename='members/logs/debug.log')
logging.basicConfig(format='[%(levelname)s]%(asctime)s %(message)s', level=settings.LOGGERLEVEL, filename=settings.LOGPATH)
#function to validate reCaptcha
+2
View File
@@ -12,6 +12,7 @@ https://docs.djangoproject.com/en/1.9/ref/settings/
import os
import logging
from os.path import expanduser
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
@@ -126,6 +127,7 @@ GOOGLE_RECAPTCHA_SECRET_KEY = "YOUR-PRIVATE-KEY"
#Logger level
LOGGERLEVEL = logging.ERROR
LOGPATH = expanduser("~")+ "/debug.log"
# Internationalization
# https://docs.djangoproject.com/en/1.9/topics/i18n/
+1 -1
View File
@@ -5,7 +5,7 @@ from django.conf import settings
import logging
webilogger = logging.getLogger(__name__)
logging.basicConfig(format='[%(levelname)s]%(asctime)s %(message)s', level=settings.LOGGERLEVEL, filename='members/logs/debug.log')
logging.basicConfig(format='[%(levelname)s]%(asctime)s %(message)s', level=settings.LOGGERLEVEL, filename=settings.LOGPATH)
@require_http_methods(["GET"])