I am using python in linux and tried to use command line to print out the output log while redirecting the output and error to a txt.file. However, after I searched and tried the methods such as
python [program] 2>&1 | tee output.log
But it just redirected the output the the output.log and the print content disappeared. I wonder how I could print the output to console while save/redirect them to output.log ? It would be useful if we hope to tune the parameter while having notice on the output loss and parameter.