How to print console logs to textfile?


How do I print the console logs (such as the one in the attached image) in a textfile?

For tf, I just run the command line with 2>logfile, which redirects stderr to a file.


Did this:

but still doesn’t work.

You still need the “2>…” part for stderr, I think. I’m no MS CMD expert, but I believe what you want is:

python -m bin.main train_and_eval --model config/models/ --config config/opennmt-defaults.yml config/data/toy-ende.yml 1>opennmt.log 2>&1


Thank you so much. It worked :slight_smile: