Quickly setup SQL query logging - django
Add this to your settings:
LOGGING = {
'version': 1,
'disable_existing_loggers': False,
'handlers': {
'console': {
'level': 'DEBUG',
'class': 'logging.StreamHandler',
}
},
'loggers': {
'django.db.backends': {
'handlers': ['console'],
'level': 'DEBUG',
},
}
}
Written by Jakh Daven
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Logging
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#