The actual part to write a line of text to a file is quite simple.
var fso = new ActiveXObject("Scripting.FilesystemObject");
var file = fso.OpenTextFile("c:\mylog.txt", 8, false);
if (file) file.WriteLine("My LogOutput..");
if (file) file.Close();
Don't nail me on the correctness of the parameters passed to OpenTextFile(), but that's it basically. What increases the number of lines in the implementation in ScriptWizard is the support for intendation, log levels, buffering, patterns for dynamic filenames and such.
You could also try the XLog script addin helper I made, it's quite a good start to get a nifty little file logging function.
It already has loglevels, indendation and some other stuff built in, what's missing is writing out to files, find a description here: