macournoyer / thin

A very fast & simple Ruby web server
https://rubygems.org/gems/thin
2.27k stars 345 forks source link

Running thin behind a pipe doesn't show messages #371

Open rp-pedraza opened 4 years ago

rp-pedraza commented 4 years ago

I'm trying to merge thin's output with another static auto-builder command using parallel --line-buffer ::: 'thin ...' 'another command' and I'm not seeing thin's messages. Is it perhaps buffered?

thin ... | cat doesn't show anything either but I can verify that server is running well with the browser.

rp-pedraza commented 4 years ago

Tested this with 1.7.2 and a65c608e014f640a8a63c5c2dd00666fd8eff683.

ioquatix commented 4 years ago

Is it printing to stdout or stderr?

rp-pedraza commented 4 years ago

Is it printing to stdout or stderr?

It prints messages normally while not being piped. But if I append | cat there's nothing. However if I force to run it in an invalid directory it does produce stderr errors. I can't tell if the error messages are just shown after the buffer is flushed in exit.

ioquatix commented 3 years ago

It sounds like logging is going to stderr. Well, if you want to submit a PR to fix this, it would be welcome.