Skip to content

Instantly share code, notes, and snippets.

@mpontillo
Created February 10, 2017 21:47
Show Gist options
  • Save mpontillo/6fdd6aacd50d1b07867cf99304f50472 to your computer and use it in GitHub Desktop.
Save mpontillo/6fdd6aacd50d1b07867cf99304f50472 to your computer and use it in GitHub Desktop.
Django temporary logging example
import logging
l = logging.getLogger('django.db.backends')
l.setLevel(logging.DEBUG)
l.addHandler(logging.StreamHandler())
# Code to execute QuerySet goes here.
l.setLevel(logging.INFO)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment