Django logdna not working. server getting stuck
import logging
from logdna import LogDNAHandler
LOGGING = {
'version': 1,
'disable_existing_loggers': False,
'formatters': {
'verbose': {
'format': "[%(asctime)s] %(levelname)s [%(name)s:%(lineno)s]" +
"%(message)s",
'datefmt': "%d/%b/%Y %H:%M:%S"
},
'color': {
'()': 'colorlog.ColoredFormatter',
'format': '%(log_color)s%(asctime)s %(levelname)-8s %(name)s %(module)s %(pathname)s:%(lineno)s%(reset)s \n\r\t %(message)s',
'datefmt': "%d/%b/%Y %H:%M:%S",
'log_colors': {
'DEBUG': 'cyan',
'INFO': 'green',
'WARNING': 'yellow',
'ERROR': 'red',
'CRITICAL': 'red,bg_white',
}
}
},
'filters': {
'require_debug_true': {
'()': 'django.utils.log.RequireDebugTrue',
},
},
'handlers': {
'console': {
'level': 'DEBUG',
'filters': ['require_debug_true'],
'class': 'logging.StreamHandler',
'formatter': 'color'
},
'logdna': {
'level': logging.DEBUG,
'class': 'logdna.LogDNAHandler',
'key': "f47ec154e993efce66ed784ad7g3g76b8cb91",
'options': {
# 'app': '<app name>',
# 'env': "alpha",
'index_meta': True,
},
},
},
'loggers': {
'': {
'level': logging.DEBUG,
'handlers': ['logdna'],
'propagate': True,
},
}
}
I am using above code for django logging using logdna. But when i am running django server it is getting stuck .
what can be the reason ? Am i doing it correctly ?
Please take a look
I am following https://github.com/logdna/python
doc for implementation.
django with logdna for logging