Created
April 10, 2012 13:44
-
-
Save aaugustin/2351479 to your computer and use it in GitHub Desktop.
Django: log all database queries in the console
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
import logging | |
logger = logging.getLogger('django.db.backends') | |
logger.setLevel(logging.DEBUG) | |
logger.addHandler(logging.StreamHandler()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment