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

Correct way of logging output from sub-processes #868

Open
ioquatix opened this issue Mar 27, 2017 · 3 comments
Open

Correct way of logging output from sub-processes #868

ioquatix opened this issue Mar 27, 2017 · 3 comments

Comments

@ioquatix
Copy link
Member

ioquatix commented Mar 27, 2017

I'm currently trying to figure out a solution to jc00ke/guard-puma#24

By default, guard-puma spawns puma and it writes several lines of startup information, and then per-request log lines, to stdout.

The problem is this clobbers the guard shell.

What is the correct way to log lines of output when executing sub-processes via guard?

@ioquatix
Copy link
Member Author

An example of the shell getting clobbered:

15:25:35 - INFO - Guard is now watching at '/tmp/test'
[1] guard(main)> Puma starting in single mode...
* Version 3.8.2 (ruby 2.4.0-p0), codename: Sassy Salamander

@ioquatix
Copy link
Member Author

I checked the wiki under logging, but I couldn't see any obvious example of how sub-processes output should be handled. I'm sure this is simple, but perhaps we could also update the documentation.

@frederikspang
Copy link

This happens even without guard-puma, also just with rails and sidekiq. I have to open guard, and press enter for it all to run, before it shows up normally.

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

2 participants