I'm attempting to migrate an application from a linode to heroku. Everything is working okay, except I'm not getting errors appearing in the logs.
According to the heroku documentation, anything writing to stdout or stderr should appear in the logs.
https://devcenter.heroku.com/articles/logging
And according to the uwsgi documentation, errors should be written to stdout by default unless there are settings otherwise.
https://uwsgi-docs.readthedocs.io/en/latest/Logging.html
I have a page which is returning an internal server error:
Internal Server Error
The server encountered an unexpected internal server error
(generated by waitress)
But I'm getting nothing in the logs at all. I have nothing to go by to troubleshoot.
2016-12-14T16:56:58.846534+00:00 heroku[web.1]: State changed from starting to up
2016-12-14T16:57:06.401955+00:00 heroku[router]: at=info method=GET path="/manager/expenses?expense_group_id=1" host=singleentry-dev.herokuapp.com request_id=b5ce7308-7769-4412-b56a-aaa5bf0208f2 fwd="75.49.124.130" dyno=web.1 connect=1ms service=638ms status=200 bytes=64002
2016-12-14T16:57:08.572829+00:00 heroku[router]: at=info method=GET path="/manager/expense?expense_id=497" host=singleentry-dev.herokuapp.com request_id=d4bb8ba8-af50-4885-8dc1-a34e806e0ea1 fwd="75.49.124.130" dyno=web.1 connect=1ms service=186ms status=200 bytes=48970
2016-12-14T16:57:14.319986+00:00 heroku[router]: at=info method=POST path="/manager/upload_add" host=singleentry-dev.herokuapp.com request_id=74c4ac00-b5f8-4dcb-a13f-a90386e055e1 fwd="75.49.124.130" dyno=web.1 connect=1ms service=1402ms status=500 bytes=269
I don't think there's anything in my config that would cause errors to be redirected somewhere else. production.ini:
###
# app configuration
# http://docs.pylonsproject.org/projects/pyramid/en/1.5-branch/narr/environment.html
###
[app:main]
use = egg:corefinance
pyramid.reload_templates = false
pyramid.debug_authorization = false
pyramid.debug_notfound = false
pyramid.debug_routematch = false
pyramid.default_locale_name = en
pyramid.includes =
pyramid_debugtoolbar
pyramid_tm
session.secret = x
# By default, the toolbar only appears for clients from IP addresses
# '127.0.0.1' and '::1'.
# debugtoolbar.hosts = 24.155.241.1
###
# wsgi server configuration
###
[server:main]
use = egg:waitress#main
host = 0.0.0.0
port = 80
###
# logging configuration
# http://docs.pylonsproject.org/projects/pyramid/en/1.5-branch/narr/logging.html
###
[loggers]
keys = root, corefinance, sqlalchemy
[handlers]
keys = console
[formatters]
keys = generic
[logger_root]
level = INFO
handlers = console
[logger_corefinance]
level = DEBUG
handlers =
qualname = corefinance
[logger_sqlalchemy]
level = WARN
handlers =
qualname = sqlalchemy.engine
# "level = INFO" logs SQL queries.
# "level = DEBUG" logs SQL queries and results.
# "level = WARN" logs neither. (Recommended for production systems.)
[handler_console]
class = StreamHandler
args = (sys.stderr,)
level = NOTSET
formatter = generic
[formatter_generic]
format = %(asctime)s %(levelname)-5.5s [%(name)s][%(threadName)s] %(message)s
[uwsgi]
http = 0.0.0.0:80
die-on-term = 1
master = 1
#logto = /var/log/wsgi/uwsgi.log
enable-threads = true
offload-threads = N
py-autoreload = 1
wsgi-file = /var/www/finance/corefinance/wsgi.py
I'm currently stuck and can't move forward because I can't figure out what the error is on the page. Any ideas?