Może mi ktoś powiedzieć czemu mi logi upieraa w połowie tzn
w pliku mam
+---- START ------- [2012-01-17] [13:44:41] --------------+
[13:44:41] [Application] AppDir [C:\Users\ProQix Polaczeq\Desktop\Tia\Server\Server.exe]
[13:44:41] [Application] Load CFG
[13:44:41] [Plugins Manager] Exec [plugin_in
Po zamknięciu aplikacji nic się nie zmienia
a procedurki za to odpowiedzialne wyglądają tak
procedure TTiaServerBody.LogEvent(Data:String);
begin
WriteLn(g_EventFile,Data);
end;
procedure TTiaServerBody.LogEventBegin;
begin
AssignFile(g_EventFile,AppDir+'Logs\'+DateToStr(Date)+' - Events.log');
if FileExists(AppDir+'Logs\'+DateToStr(Date)+' - Events.log') = True then Append(g_EventFile) else Rewrite(g_EventFile);
LogEvent(Format('+---- START ------- [%s] [%s] --------------+',[DateToStr(Date),TimeToStr(Time)]));
end;
procedure TTiaServerBody.LogEventEnd;
begin
LogEvent(Format('+----- END --------- [%s] [%s] --------------+',[DateToStr(Date),TimeToStr(Time)]));
Sleep(400);
CloseFile(g_EventFile);
LogsBox.Items.SaveToFile(AppDir+'Logs\'+DateToStr(Date)+' - Events.log');
end;
LogEvent(Format('[%s] [%s] AppDir [%s]',[TimeToStr(Time),'Application',Application.ExeName]));
podobnie wygląda reszta tylko nie wiem czemu tak ucina?
Ostatnia linia w pliku powinna wyglądać tak
[1357] [Plugins Manager] Exec [plugin_initd] - DLL [C:\WEBServer\Lib\tester.dll]
a Format('+----- END --------- [%s] [%s] --------------+',[DateToStr(Date),TimeToStr(Time)]) nie ma a powinno być