Skip to content

Instantly share code, notes, and snippets.

@arielsvn
Created December 8, 2018 21:23
Show Gist options
  • Save arielsvn/2ce1c13f32ad2b621d8496e788aa3ddb to your computer and use it in GitHub Desktop.
Save arielsvn/2ce1c13f32ad2b621d8496e788aa3ddb to your computer and use it in GitHub Desktop.
Quickly setup SQL query logging - django
LOGGING = {
'version': 1,
'disable_existing_loggers': False,
'handlers': {
'console': {
'level': 'DEBUG',
'class': 'logging.StreamHandler',
}
},
'loggers': {
'django.db.backends': {
'handlers': ['console'],
'level': 'DEBUG',
},
}
}
@arielsvn
Copy link
Author

arielsvn commented Dec 8, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment