i found these two similar questions: Redirect stdout to a file and add a timestamp and How to add timestamp to STDERR redirection to redirect stdout to a file.
I want to add a timestamp when the line is written to the file. At the moment I wrtie the log file like this:
START cmd /c %PATH_STLink-OPENOCD%\openocd.exe -f %CD%\%CFG_File% -s %PATH_SUPPORTFILES% -d0 ^> output.txt
It would be nice, when the output could look like this (using %date% and %time%). Hopefully this is possible:
[10.03.2022, 16:11:40,45]output of openocd.exe
[10.03.2022, 16:11:42,21]output of openocd.exe
[10.03.2022, 16:11:43,65]output of openocd.exe
Thank you very much!