How to create log file

Hi all

I created a log file every thing is working properly but i’m not able to write more than one line.

can you guess any idea .below i pasted my code also

FileTable.RESET;
FileTable.SETFILTER(FileTable.Path,‘E:\WebOrder’);
FileTable.SETRANGE(FileTable.“Is a file”,TRUE);
IF FileTable.FIND(’-’) THEN
BEGIN
REPEAT
DP.IMPORT;
TemFileName:=FileTable.GETFILTER(FileTable.Path)+’’+FileTable.Name;
DP.FILENAME:=TemFileName;
DP.RUNMODAL;
CLEAR(DP);
LogFile.CREATE( ‘E:\WebOrder\Import Log.txt’);
LogFile.CREATEOUTSTREAM(OutStreamObj);
OutStreamObj.WRITETEXT (TemFileName + ’ ’ + ‘Imported successfully and deleted’);
LogFile.CLOSE;
ERASE(TemFileName);
UNTIL FileTable.NEXT = 0;
END;

Thanks

Jerome Marshal.j

Well it looks to me like you’re creating a new file for each REPEAT … UNTIL loop.

Yes erick you are correct.When the loop is executing the new log is over write the previous one thes my problem

Hi Marshal,

Please verify the above answer if it was the correct answer. Thanks.