Skip to content

Instantly share code, notes, and snippets.

@sahilgupta
Created August 28, 2013 12:33
Show Gist options
  • Save sahilgupta/6365511 to your computer and use it in GitHub Desktop.
Save sahilgupta/6365511 to your computer and use it in GitHub Desktop.
Django SQL logging while working in the shell.
import logging
logging = logging.getLogger('django.db.backends')
logging.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