11👍
✅
Looks like it was simply a problem caused by an expectation that Django under Heroku would work like Rails. Silly me.
For anyone else suffering this problem when moving from one framework/language to another:
- When debug is off, Django uses the standard Python logger to handle errors in the code.
- There is a default set-up at the bottom of settings.py which emails the site admins when there are errors. Nice. It needs an array of email addresses in the ADMINS variable in settings.py to work.
-
Errors are sent, by default, to STDERR instead of STDOUT, so they won’t show in the logs. This can be changed apparently. Try here if you want this behaviour:
http://codeinthehole.com/writing/console-logging-to-stdout-in-django/
0👍
This behavior is set by the server (e.g. gunicorn), not Django or Heroku.
There’s usually a command line or configuration that changes the default log level.
- Using Django's built in web server in a production environment
- Using Case in django
- Django Rest Framework reverse and SimpleRouter
Source:stackexchange.com