Created
October 1, 2018 06:26
-
-
Save nnja/e99a37727d23ce4346b2925ae75e7d7c to your computer and use it in GitHub Desktop.
Log every database query in django with DEBUG=True
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': { | |
'file': { | |
'level': 'DEBUG', | |
'class': 'logging.FileHandler', | |
'filename': '/path/to/django/debug.log', | |
}, | |
}, | |
'loggers': { | |
'django.db.backends': { | |
'handlers': ['file'], | |
'level': 'DEBUG', | |
}, | |
}, | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment