I'd like to log the output of several processes I start with multiprocessing. My question is related to Log output of multiprocessing.Process .
However, the difficulty is, that I'm using some library that calls external programs which output to stdout
. Is there a way of capturing the output of these external programs called within python session opened by multiprocessor
without altering the code of that library that calls these programs?
Edit:
The processes of python started by multiprocessing seem to have some more subprocesses I guess that's why some of the output is still printed to stdout
.
I get output files for PIDs 4491, 4490, and 4489