procedure RunLog(aStr: string);
var
f: TextFile;
begin
AssignFile(f, LogFileName);
if FileExists(LogFileName) then
begin
//if MyGetFileSize(LogFileName) >= 204800 then //200K则自动清空日志
//begin
// Rewrite(f);
//end else
Append(f);
end else
ReWrite(f);
Writeln(f, aStr);
Flush(f);
CloseFile(f);
end;