-
Notifications
You must be signed in to change notification settings - Fork 24
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
Logging of subprocess jobs to Logbook #14
Comments
maybe our @brainstorm has something to aport?... :-P |
I tried bothering @brainstorm earlier but I suspect he's on vacation or remaining silent for my own good so I learn to read the docs myself. |
http://adam.herokuapp.com/past/2011/4/1/logs_are_streams_not_files/
|
I can't recall precisely now but I think I was hoping for a non-blocking way to do this -- I believe readlines would wait until it got a StopIteration or whatever? I should have been more specific. Though now that I'm thinking about it the logs would get pretty confusing with multiple processes feeding them output simultaneously. Also I love reading emails from Roman! I promise to have a key-signing party as the next GW talk, although we may have to lie about what's actually happening in the announcement |
This is were my comment on listening to @guillermo-carrasco and putting No need to lie, just have the party at the beggining or end of the talk |
Aha I see, I tried it and it worked :-). What about?:
Maybe encapsulated in a |
Yeah but |
Also I'm all for RedisHandler and LogBook and all that. We haven't decided against that at all, we just haven't gotten around to it yet. |
okok, I'll talk about ELK on the next Dev meeting. |
Gotcha @mariogiov, thanks so much for making me search this one: http://stackoverflow.com/questions/375427/non-blocking-read-on-a-subprocess-pipe-in-python Can I hire you? :) |
Oh no, you don't! ;-) 2014-08-20 10:20 GMT+02:00 Roman Valls Guimerà notifications@github.com:
Per Kraulis, Ph.D. |
Hahaha @pekrau xD Now that I think, isn't this a similar problem you had with genologics @alneberg ? |
How about this one: http://www.electricmonk.nl/log/2011/08/14/redirect-stdout-and-stderr-to-a-logger-in-python/ It replaces stdout and stderr with logger instances, should ideally be done within a context manager I guess. |
Alright the implementation I coded up is here: this follows the general implementation as outlined in the handy stackoverflow post @brainstorm mentioned above. |
Merge pull request #192 from mariogiov/fix_rotation
I haven't yet figured out how to redirect stdout and stderr to Logbook, but there I'm hoping there is some way to do this.
The text was updated successfully, but these errors were encountered: