Skip to content

Instantly share code, notes, and snippets.

@xen
Created January 7, 2020 09:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xen/9949cde024db65a374dcd5ff6b685ced to your computer and use it in GitHub Desktop.
Save xen/9949cde024db65a374dcd5ff6b685ced to your computer and use it in GitHub Desktop.
# django shell console logging SQL queries
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