...do you have a console window open (and associated with VoiceAttack)? The Console.WriteLine() method is intended for console applications, E.G. running in a cmd window.
As the documentation notes, the VA.WriteToLog() method outputs to the log on the main window.
What about the "LastSpoken()" method is not documented?
LastSpoken() – returns a string which indicates the last-spoken command phrase. Useful from within sub-commands where you need to know what was said to invoke the root command, or if you need to know what was spoken prior to the current command (if the current command was not spoken (executed by keyboard, mouse, joystick, external, etc.).
This is not directly related to the "activity log". Also note that it is the equivalent of the "{LASTSPOKENCMD}" token, I.E. it returns the last recognized spoken
command, not whatever the speech recognition engine last recognized (which is what the "{LASTSPOKEN}" token would return)
E.G. if your command's "When I say" field contains "[an;] example command;an alternate phrase", and you speak "example command", the output of the LastSpoken() method would be "example command" (as mentioned, it is not directly related to the log on the main window, so there is no timestamp; you could look at the LastUserExec() method for something along those lines, though that applies to all commands, not just spoken ones)
There is no native (to VoiceAttack) method for retrieving the contents of the log programmatically.