lp:~terceiro/lava-dispatcher/stdout-stderr-log
Created by
Antonio Terceiro
and last modified
- Get this branch:
- bzr branch lp:~terceiro/lava-dispatcher/stdout-stderr-log
Only
Antonio Terceiro
can upload to this branch. If you are
Antonio Terceiro
please log in for upload directions.
Branch merges
Propose for merging
No branches
dependent on this one.
Related bugs
Bug #1127288: stdout from subprocesses missing from output.txt | Critical | Fix Released |
|
Related blueprints
Branch information
Recent revisions
- 573. By Antonio Terceiro
-
Now actually capture all the output in both stdout and log file.
The problem was that subprocess.call and subprocess.
check_call bypass the
write() method of the file objects you pass in stdout and stderr. Instead the
subprocess functions will use the underlying file descriptor (#fileno()) and
dump the output there, so you need a file object that has a proper descriptor
to duplicate the output to both stdout and the output.txt log file.This can be accomplished by creataing a pipe to tee(1); that pipe gets a proper
file descriptor and will spit the output both to stdout and to the file you
pass to it in the command line.
Branch metadata
- Branch format:
- Branch format 7
- Repository format:
- Bazaar repository format 2a (needs bzr 1.16 or later)
- Stacked on:
- lp:lava-dispatcher