Created
May 8, 2022 11:56
-
-
Save akshayjai1/82ff6d491f6b5a259e7becaf065cee46 to your computer and use it in GitHub Desktop.
logging sql queries for django
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
LOGGING = { | |
'version': 1, | |
'filters': { | |
'require_debug_true': { | |
'()': 'django.utils.log.RequireDebugTrue', | |
} | |
}, | |
'handlers': { | |
'console': { | |
'level': 'DEBUG', | |
'filters': ['require_debug_true'], | |
'class': 'logging.StreamHandler', | |
} | |
}, | |
'loggers': { | |
'django.db.backends': { | |
'level': 'DEBUG', | |
'handlers': ['console'], | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment