Debug log moved to Home by default
...Vittusaatana...
This commit is contained in:
+1
-1
@@ -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
|
||||
|
||||
@@ -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
@@ -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"])
|
||||
|
||||
Reference in New Issue
Block a user