Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
tzipisheinin opened this issue Aug 25, 2021 · 3 comments
Open

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

tzipisheinin opened this issue Aug 25, 2021 · 3 comments

Comments

@tzipisheinin
Copy link

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 tzipisheinin changed the title forman start doesn't show some errors Forman doesn't show errors and logs of Procfile commands Aug 25, 2021
@tzipisheinin
Copy link
Author

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

@dentarg
Copy link

dentarg commented Oct 31, 2021

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
Copy link

danielricecodes commented Nov 13, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants