開発中に大量のエラーを吐き出していたので
エラー表示を見ながらファイルにも保存したかったのに、tee を仲介させた途端何も出力しなくなった
標準出力がバッファリングされるのが原因らしい
python3 hoge.py | tee log
を
python3 -u hoge.py | tee log
と、-u オプション追加で、解決した。
Go to list of users who liked
Share on X(Twitter)
Share on Facebook
More than 3 years have passed since last update.
開発中に大量のエラーを吐き出していたので
エラー表示を見ながらファイルにも保存したかったのに、tee を仲介させた途端何も出力しなくなった
標準出力がバッファリングされるのが原因らしい
python3 hoge.py | tee log
を
python3 -u hoge.py | tee log
と、-u オプション追加で、解決した。
Register as a new user and use Qiita more conveniently
Go to list of users who liked