Skip to content

Instantly share code, notes, and snippets.

@pardo
Created September 30, 2015 13:52
Show Gist options
  • Save pardo/cdfb5671c6477b6da551 to your computer and use it in GitHub Desktop.
Save pardo/cdfb5671c6477b6da551 to your computer and use it in GitHub Desktop.
Log sql to terminal django app
import logging
l = logging.getLogger('django.db.backends')
l.setLevel(logging.DEBUG)
l.addHandler(logging.StreamHandler())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment