python command line output redirected to log file

 

Link  https://blog.csdn.net/u010158659/article/details/81671901

-u forces python not to use the IO buffer, use it at runtime         

python -u main.py 2>&1 | tee xxx.log

       

 there is no such problem

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325680063&siteId=291194637