I have no idea why this is not working. Im using linode to host my ubuntu server with apache hosting my django.
in my settings.py file I have this to define my logger
import logging
LOGGING = {
'version': 1,
'disable_existing_loggers': True,
'formatters': {
'standard': {
'format' : '%(asctime)s [%(levelname)s] %(name)s: %(message)s'
},
},
'handlers': {
'default': {
'level': 'DEBUG',
'class': 'logging.handlers.RotatingFileHandler',
'filename': '/logs/django.log',
'maxBytes': 1024*1024*5,
'formatter' : 'standard',
'backupCount': 5,
},
},
'loggers': {
'': {
'handlers': ['default'],
'level': 'DEBUG',
'propagate': True,
},
},
}
then I use it in my view like this
import logging
logr = logging.getLogger(__name__)
def login(request):
logr.debug("THIS BETTER WORK >:O")
c = {}
c.update(csrf(request))
return render_to_response('accounts/login.html', c)
I'm not getting any error messages or any output just nothing its not writing to file or anything.
What am I doing wrong? I created the log file put it in the right spot and gave it full permissions. I'm getting pretty desperate at this point. I just want any way to log something so I can start debugging my website.
/logs/django.log??