Hi Rolf,
Typing the command "log -f=C:\logfile.txt" in PI's command line then there occurs a PCL Exception with File I/O Error message.
That happens because you probably don't have enough privileges to write to the "C:\" root folder. The error message is rather confusing:
The system cannot find the specified file, but this is quite frequent on Windows.
Choosing a different disk then C: and typing for example "log -f=E:\logfile.txt" then there is the log file actually created but only including three lines not as expected all the console text output.
The log file works well, but you cannot read its contents until you close it. For performance reasons, the log file is buffered. In other words, the log data are stored in memory and only sent to the file occasionally while the file remains open. When the file is closed, all the pending data are committed and actually written to disk.
You can close the log file with the --close argument:
log --closeAlternatively, you can force writing of all pending log file data without closing the file:
log --flush