Skip to content
This repository has been archived by the owner on Apr 14, 2019. It is now read-only.

Commit

Permalink
Add LOGGING configuration
Browse files Browse the repository at this point in the history
This enables running django management commands with
DJANGO_LOG_LEVEL=DEBUG in order to see all the SQL queries that django
is executing.
  • Loading branch information
tdooner committed Aug 22, 2016
1 parent d2a7a7d commit 9590a09
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions disclosure/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,22 @@
NETFILE_DOWNLOAD_DIR = op.join(DATA_DIR, 'netfile')


LOGGING = {
'version': 1,
'disable_existing_loggers': False,
'handlers': {
'console': {
'class': 'logging.StreamHandler',
},
},
'loggers': {
'django': {
'handlers': ['console'],
'level': os.getenv('DJANGO_LOG_LEVEL', 'INFO'),
},
},
}

INSTALLED_APPS = (
'django.contrib.admin',
'django.contrib.auth',
Expand Down

0 comments on commit 9590a09

Please sign in to comment.