Skip to content

Commit

Permalink
Add Django streamhandler logging with DEBUG (#763)
Browse files Browse the repository at this point in the history
  • Loading branch information
inovizz committed May 7, 2023
1 parent 4df0d5f commit f306c6e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
1 change: 1 addition & 0 deletions .env.sample
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,4 @@ TWITTER_CONSUMER_SECRET=twitter_consume_secret
TWITTER_ACCESS_TOKEN_KEY=twitter_access_token
TWITTER_ACCESS_TOKEN_SECRET=twitter_access_token_secret
USE_ASYNC_FOR_EMAIL=boolean
DJANGO_LOG_LEVEL=DEBUG
11 changes: 9 additions & 2 deletions settings/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,12 +189,19 @@
},
},
"loggers": {
"django": {
"handlers": ["console"],
"level": os.environ.get("DJANGO_LOG_LEVEL", "DEBUG"),
},
"django.request": {
"handlers": ["mail_admins", ],
"handlers": ["mail_admins"],
"level": "ERROR",
"propagate": True,
},
"django.db.backends": {"level": "DEBUG", "handlers": ["file", ], },
"django.db.backends": {
"level": "DEBUG",
"handlers": ["file"],
},
},
}

Expand Down

0 comments on commit f306c6e

Please sign in to comment.