![]() |
EventLog: Wieso wird log-Datei immer neu angelegt?
Hallo,
nutze die Komponente EventLog und folgenden Code. Nun wird die test.log-Datei beim Klick auf Button1 immer neu angelegt obwohl sie schon existiert. Wieso ist das so?
Delphi-Quellcode:
Danke!
procedure TForm1.Button1Click(Sender: TObject);
begin EventLog1.LogType := ltFile; EventLog1.FileName := 'D:\myprog\eventlog\test.log'; EventLog1.Active := True; end; procedure TForm1.Button2Click(Sender: TObject); begin EventLog1.Log('This is a log.'); EventLog1.Warning('This is a warning.'); EventLog1.Error('This is a error.'); EventLog1.Info('This is a info.'); EventLog1.Debug('This is a debug.'); end; |
AW: EventLog: Wieso wird log-Datei immer neu angelegt?
.. dazu müsste man sich die Sourcen von TEventLog anschauen..
Aber vielleicht suchst Du auch das:
Code:
Grüße
procedure Pause; Pause the sending of log messages.
procedure Resume; Resume sending of log messages if sending was paused Klaus |
AW: EventLog: Wieso wird log-Datei immer neu angelegt?
Zitat:
|
AW: EventLog: Wieso wird log-Datei immer neu angelegt?
Zitat:
![]() Gruß k-h |
Alle Zeitangaben in WEZ +1. Es ist jetzt 23:23 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz