I have a simple Python/Flask web that contains this:
@app.route('/index')
def index():
app.logger.warning('test message 1\ntest message 2\ntest message 3')
Note the newline characters.
When I run it with heroku local web I see this in the logs:
web.1 | WARNING:app:test message 1
But when I push it to heroku instead of running it locally I see:
2015-12-09T22:23:21.102478+00:00 app[web.1]: WARNING in app[/app/app.py:17]: test message 1
2015-12-09T22:23:21.102482+00:00 app[web.1]: test message 2
2015-12-09T22:23:21.102483+00:00 app[web.1]: test message 3
Why does heroku local truncate the logs to the first line? I hate that and want it to stop.
My Procfile is:
web: gunicorn app:app --log-file -
I know it is not Flask or gunicorn doing that because when I run gunicorn by itself, I see
WARNING in app [/home/vagrant/Projects/milestone1/app.py:20]: test message 1
test message 2
test message 3
It has to be heroku local.