plumbum icon indicating copy to clipboard operation
plumbum copied to clipboard

How cand I redirect the stdout and stderr to a log file as well as screen(stdout)?

Open yingbo opened this issue 6 years ago • 2 comments

Not sure how can I do it. The "TEE" can only to stdout; piping to local["tee"]["a_log_file"] doesn't work either.

Thanks!

yingbo avatar Mar 29 '18 18:03 yingbo

Doesn't ret_code, stdout, stderr = command & TEE do both?

henryiii avatar Mar 29 '18 20:03 henryiii

Hi,

it works, just a little different than "tee" in bash, I have to keep the stdout and stderr in memory, while bash's "tee" redirects to disk files directly.

yingbo avatar Apr 02 '18 18:04 yingbo