Created
October 25, 2018 07:41
-
-
Save haroldrandom/3798330a0ba7910b920e241cfc3efc39 to your computer and use it in GitHub Desktop.
Setup SQL query logging in Django
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
LOGGING = { | |
'version': 1, | |
'disable_existing_loggers': False, | |
'handlers': { | |
'console': { | |
'level': 'DEBUG', | |
'class': 'logging.StreamHandler', | |
} | |
}, | |
'loggers': { | |
'django.db.backends': { | |
'handlers': ['console'], | |
'level': 'DEBUG', | |
}, | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment