procedure Jslog(szLogText:string);
var
pMyFile : TextFile;
begin
Assignfile(pMyFile, ‘log.txt‘);
if FileExists(‘log.txt‘) then
Append(pMyFile)
else
ReWrite(pMyFile);
Writeln(pMyFile, szLogText);
CloseFile(pMyFile);
end;
原文:https://www.cnblogs.com/semth/p/8918720.html