ddollar / foreman

Manage Procfile-based applications
http://ddollar.github.com/foreman
MIT License
6.03k stars 633 forks source link

Forman doesn't show errors and logs of Procfile commands #782

Open tzipisheinin opened 3 years ago

tzipisheinin commented 3 years ago

My Procfile.https look like this: web: thin start --ssl --ssl-key-file server.key --ssl-cert-file server.crt --port 3000 redis: redis-server worker: bundle exec rake resque:work QUEUE='*' scheduler: bundle exec rake resque:scheduler guard: guard -P livereload and I just find out that running the first command - web using forman start -f Procfile.https doesn't show the errors of this command, but when I run this line alone in terminal, I can see the exact errors. Does foreman hide the errors, or maybe he doesn't even get those errors from his child commands

tzipisheinin commented 3 years ago

Am I clear enough? does anybody know what I'm talking about?

dentarg commented 2 years ago

The output from thin is probably buffered, see https://stackoverflow.com/questions/29998728/what-stdout-sync-true-means

Drop this early in your app somewhere:

$stdout.sync = true
$stderr.sync = true
danielricecodes commented 2 years ago

Drop this early in your app somewhere:

$stdout.sync = true
$stderr.sync = true

I'm having trouble with this. I've been using foreman for years and all of my older apps have $stdout.sync = true in it - usually at the bottom of development.rb. Fast forward to today with Rails 6.1, Ruby 2.7, and foreman 0.87.2, nothing seems to work. development.rb doesn't work. Even if I try in config.ru above run Rails.application it doesn't work.

I usually just open up another Terminal tab and tail -f log/development.log - but I sure do miss not having to do this and having the development log scroll like it always has.