I forgot to mentions, I am using logger also as below-
On Thursday, July 26, 2018 at 4:47:18 PM UTC+5:30, Jason wrote:
-- # send server errors to admin
ADMINS = (('admin', 'admin@example.com'),)
MANAGERS = ADMINS
# Logging configuration for production
LOGGING = {
'version': 1,
'disable_existing_loggers': False,
'formatters': {
'verbose': {
'format': '%(asctime)s [%(levelname)s] %(filename)s:%(lineno)s %(funcName)s() : %(message)s'
},
'simple': {
'format': '%(asctime)s [%(levelname)s] : %(message)s'
},
},
'handlers': {
'file': {
'level': 'ERROR',
'class': 'logging.FileHandler',
'filename': 'error.log',
'formatter': 'verbose'
},
'mail_admins': {
'level': 'ERROR',
'class': 'django.utils.log.AdminEmailHandler',
'formatter': 'simple'
},
},
'loggers': {
'django': {
'handlers': ['file'],
'level': 'ERROR',
'propagate': True,
},
'django.request': {
'handlers': ['mail_admins'],
'level': 'ERROR',
'propagate': True,
},
},
}
On Thursday, July 26, 2018 at 4:47:18 PM UTC+5:30, Jason wrote:
ok, so you don't even have any logging configuration at all, no wonder you don't see anything.I suggest you look in the docs for this: https://docs.djangoproject.com/en/2.0/ topics/logging/
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/9f5d530e-4dcc-4082-a8a8-321ff8c03a7d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment