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

WIP: Redirect C stdout & stderr to log #70

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

jakirkham
Copy link
Contributor

Fixes #69

Captures C's stdout and stderr and logs it instead. Useful if the DRMAA implementation prints log messages out that one would like to capture.

jakirkham added 4 commits July 1, 2018 23:10
This is needed to handle redirection from C DRMAA implementations to the
Python logger.
Make sure that we have some way configured for logging from `drmaa`
generally.
This is needed for logging C stdout and stderr messages.
To ensure that information printed from the underlying DRMAA
implementation is not lost, capture the C `stdout` and `stderr`
information and log it using our logger. That way this can be handled
like any other logging information in a cluster environment.
@coveralls
Copy link

coveralls commented Jul 27, 2018

Coverage Status

Coverage decreased (-0.4%) to 90.575% when pulling 6a9ebb9 on jakirkham:redirect_c_stdout_stderr into 61b5eb6 on pygridtools:master.

@dfornika
Copy link

It looks like this is failing on python 2.6 because there's no logging.NullHandler defined. Do you think that his solution would work?

https://stackoverflow.com/a/34939479/780188

@jakirkham
Copy link
Contributor Author

Wouldn't worry about Python 2.6 as it was dropped upstream.

The main issue was it wasn't capturing the C stdout/stderr when testing it locally. So there's probably more to do here, but haven't looked into what is needed recently. If you have time/interest to explore this issue, that would be very helpful.

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

Successfully merging this pull request may close these issues.

3 participants