>One cause could be the file already opened or readonly.

I'm sure the file isn't readonly. I suppose no one opens the file too,
because I have one instance my program launched (and Delphi)



>When you turn Log to ON, it opens the file given by LogFileName but somehow
>ignore some failure.
>When trying to close the file (Log := FALSE), you get the I/O error 103
because
>the open was not successful.

It's strange action to ignore the Open fail and  cuss the Close fail
however I tried close and open the log on starting and terminating my
program.
On terminating my app is crashed.
"Exception EAccessViolation in module APP at 0008F268"

procedure AppForm.FormCreate(Sender: TObject);
var
  Path  : string;
begin
Path := ExtractFilePath(Application.ExeName) +
FormatDateTime('yyyymmddhhnnsszzz',Now) + '.log';
TnScriptConsole.LogFileName:= Path;
TnScriptConsole.Log:=true;
end;

procedure AppForm.FormDestroy(Sender: TObject);
begin
TnScriptConsole.Log:=false;
end


-- 
D!s
-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to