I can't get standard out from a supervisor controlled program, to show up in the logs. Could be a configuration issue, but I can't find the magic combination.
Here's a trivial demo using buildout to reproduce the issue, including a README.txt with instructions. Note that only the stderr log is ever written to, and if 'redirect_stderr=true' is uncommented in the config file, only stderr lands in the stdout log.
[email protected]:pbugni/supervisor_stdout_issue.git
(great tool, btw - thanks!)
Flush each stream after writing like sys.stdout.flush() or run with the streams unbuffered using python -u.
Ah, but of course. The differing behavior with stderr confused me,
but I see that it's not buffered, so even that makes sense, in
hindsight.
Thanks!
On Apr 27, 2011, at 2:33 PM, mnaberez wrote:
Flush each stream after writing like
sys.stdout.flush()or run
with the streams unbuffered usingpython -u.
Reply to this email directly or view it on GitHub:
https://github.com/Supervisor/supervisor/issues/13#comment_1066821
This was a super useful thread. Helped me out a lot – saying thanks for afar!
This would be a TERRIFIC bit of information to include in your official documentation
+1
It made my day, thanks!
thanks~
mnaberez, thanks for posting this. I had a situation where my task being run by supervisor wasn't logging anything. The sys.stdout.flush() seems to have done the trick.
Most helpful comment
Flush each stream after writing like
sys.stdout.flush()or run with the streams unbuffered usingpython -u.