Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Log Django Queries
LOGGING = {
'version': 1,
'disable_existing_loggers': True,
'formatters': {
'verbose': {
'format': '%(levelname)s %(asctime)s %(module)s '
'%(process)d %(thread)d %(message)s'
},
},
'handlers': {
'console': {
'level': 'DEBUG',
'class': 'logging.StreamHandler',
'formatter': 'verbose'
}
},
'loggers': {
'imas': {
'level': 'DEBUG',
'handlers': ['console'],
'propagate': False,
},
'django.db.backends': {
'level': 'DEBUG',
'handlers': ['console'],
'propagate': False,
},
},
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment