sympy / sympy-bot-old

SymPy pull request helper
http://reviews.sympy.org/
Other
24 stars 16 forks source link

Save all stdout and stderr output to the log #120

Open asmeurer opened 12 years ago

asmeurer commented 12 years ago

35 is related to this.

We should save all stdout and stderr to the log (in addition to showing it on the screen). Right now, only the test run is saved, but this quite often is not enough, because if there is some bug in sympy-bot (for example), the output will not be there. And sometimes it won't be in the terminal history either because there were so many test failures that they filled up the terminal history (especially if there are several tracebacks from recursion errors).

This also will remove any need for a logging mechanism, which has to be maintained and we always have to make sure that we use it. At the top of sympy-bot, we should just hook sys.stdout and sys.stderr (from my understanding of http://docs.python.org/library/sys.html#sys.stdout this is OK) with a special function that both writes to those and saves the output to a file. Then we can just use print to display any messages, just as we do now.