There is another thread talking about this: Can-I-view-the-log-of-an-executable-JSL
There @pmroz mentioned (with kudos to @Craige_Hales ) you can use
text = log capture(...YourScript...);
Save Text File("$Temp/mylog.txt");
aroung your script (...YourScript...) to capture just this part of interest rather than the whole log file, which might be full of commands and outputs you are not interested in.