How to redirect logging to a file?
I want to redirect tensorflow logging to a file, where tensorflow logging means the information that is outputted to screen: INFO:tensorflow:examples/sec: ...... INFO:tensorflow:global_step/sec: ......
I have tried command like: python run_classifier.py ...... > log.txt but it does work. Does anyone know how to do that?
It gets printed to STDERR by default so >& log.txt should work.
It gets printed to STDERR by default so >& log.txt should work.
It works, thanks! I guess "command >log.txt 2>&1" does the same thing.
@jacobdevlin-google How to enable this benchmark logging message when --do_predict=True?
My way:
cmd 2>&1 | tee output.txt