Yes, except the %EXITCODE% but you can catch it if you run the installer EXE file from console or batch.
It’s possible to write text to a log file and you are right it’s with "Write text or variables to a file”.
You can repeat this action several times for the same file and with different content, since contents is added to the end of the existing file. It’s perfect for log files indeed.