dib-lab / elvers

(formerly eelpond) an automated RNA-Seq workflow system
https://dib-lab.github.io/elvers/
Other
28 stars 3 forks source link

can we trap snakemake Python tracebacks and output them to a file? #123

Open ctb opened 5 years ago

ctb commented 5 years ago

students are getting really big nasty tracebacks from common errors, and it's really hard to decipher. I wonder if it's possible to make eelpond/elvers more friendly to newcomers by trapping those tracebacks and putting them in a file, and then being loud about where that file is.

It might also be good to provide a single command that gathers all of the log output so that people can report it more succinctly :)

charlesreid1 commented 5 years ago

The CaptureStdout object in capture_stdout.py (reminder: this is a context manager that captures output, useful for testing; it stashes the stdout object and replaces it with a string buffer) will only print the output once the workflow is finished and everything has run. But, you might be able to modify that class/make a new one that would log output while also still printing everything to stdout, so it works more like tee.