Created
July 17, 2012 12:50
-
-
Save exallium/3129230 to your computer and use it in GitHub Desktop.
SQL Query Logging for Django, just in case.
This file contains hidden or 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
# Required | |
DEBUG = True | |
# SQL Query Logging | |
# Rename _LOGGING to LOGGING to enable. | |
_LOGGING = { | |
'version': 1, | |
'disable_existing_loggers': True, | |
'formatters': { | |
'simple': { | |
'format': '%(levelname)s %(message)s', | |
}, | |
}, | |
'handlers': { | |
'console':{ | |
'level':'DEBUG', | |
'class':'logging.StreamHandler', | |
'formatter': 'simple' | |
}, | |
}, | |
'loggers': { | |
'django': { | |
'handlers': ['console'], | |
'level': 'DEBUG', | |
}, | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment