uzhyca
Last Updated: October 29, 2016
·
5.018K
· tuxcanfly
1d58a566b2874ca3953985af9726b32d

Quickly setup SQL query logging - django

Add this to your settings:

LOGGING = {
    'version': 1,
    'disable_existing_loggers': False,
    'handlers': {
        'console': {
            'level': 'DEBUG',
            'class': 'logging.StreamHandler',
        }
    },
    'loggers': {
        'django.db.backends': {
            'handlers': ['console'],
            'level': 'DEBUG',
        },
    }
}
Say Thanks
Respond