21

I'm trying to use "puts" to test a few things with a Sinatra app that's hosted on Heroku. Interestingly, the output seems to queue up and only displays upon restarting the Heroku dyno. I've tried with 'Thin' and 'Webrick', but have the same issue.

Any thoughts?

dougiebuckets
  • 2,383
  • 3
  • 27
  • 37

1 Answers1

38

As you can see on heroku docs: add this to your config.ru:

$stdout.sync = true

Don't forget the $ before stdout or it won't work.

Josh
  • 8,329
  • 4
  • 36
  • 33
Thiago Diniz
  • 3,041
  • 5
  • 30
  • 35
  • Thank you! I missed this in the docs and couldn't work out why I wasn't seeing my logs. – James Jan 03 '17 at 18:43