I have run into problems with this. Reading the textfile while Retroarch is running sometimes breaks logging to the file. The log file stops midsentence. For example the end of the log file can look like this
RetroArch [INFO] :: Loaded state from slot #22.
Retro
Edit: after more tests it looks like Retroarch keeps generating stdout data but sometimes the log file is not updated to reflect that. When the retroarch.exe process thereafter is closed all the remaining stdout data is written to the log file. That is a problem of course in this case when I want to reliably read the stdout data while Retroarch is running to detect on the fly what game Retroarch loads, when it pauses and so on.
Edit2: I tried it with both cmd and with the powershell in Windows. When there is a redirect command Retroarch stops updating the stdout data (or rather Stderr because that is where the data is coming). If the process runs without a redirect then Retroarch keeps updating the log in the cmd or powershell window. The trouble is that I know of no good way to read those windows directly. Could you hunterk or someone else with Windows see if you can reproduce the problem on your machine?
Here is an quick way to test that.
Hit Win+R, type “powershell” then enter.
In the powershell window run this (but with the correct path to retroarch)
"[path to retroarch]\Retroarch.exe" 2>&1 | tee C: est.txt
Tee is a windows powershell tool that is supposed to enable both displaying output in the shell window and redirect it to a file at the same time. Now load a game and do a few commands in it (take a screenshot, save to a slot, load from a slot, etc). Without closing RetroArch toggle out to windows with alt+tab and check if the powershell window has stopped showing commands. For example the last load from a slot command may not be logged in the window.