You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some DRMAA implementations print information to stdout/stderr. While this information can be useful, having it print to stderr or stdout can be disruptive (e.g. launching jobs with DRMAA in an IPython terminal session) as it will get mingled with other information. It would be ideal to capture this stdout/stderr and instead redirect to somewhere like a Python log, which users can redirect as they see fit.
The main trick is capturing the C-level stdout/stderr pipes and redirecting them to something else that can used with logging. Note that working with sys.stdout/sys.stdout in Python will not address this. For a good explanation of why, please read this blog post by Eli Bendersky. Fortunately a lot of work has already been done on this and there now exists a package, wurlitzer, that handles this redirection logic for us. So it would be good if we could use this to redirect stdout/stderr from libdrmaa to a logger (possibly using StringIO as an intermediary).
The text was updated successfully, but these errors were encountered:
Some DRMAA implementations print information to
stdout
/stderr
. While this information can be useful, having it print tostderr
orstdout
can be disruptive (e.g. launching jobs with DRMAA in an IPython terminal session) as it will get mingled with other information. It would be ideal to capture thisstdout
/stderr
and instead redirect to somewhere like a Python log, which users can redirect as they see fit.The main trick is capturing the C-level
stdout
/stderr
pipes and redirecting them to something else that can used with logging. Note that working withsys.stdout
/sys.stdout
in Python will not address this. For a good explanation of why, please read this blog post by Eli Bendersky. Fortunately a lot of work has already been done on this and there now exists a package, wurlitzer, that handles this redirection logic for us. So it would be good if we could use this to redirectstdout
/stderr
fromlibdrmaa
to a logger (possibly usingStringIO
as an intermediary).The text was updated successfully, but these errors were encountered: