|
@@ -178,6 +178,7 @@ Type
|
|
procedure DoOnTerminate(Sender : TObject);
|
|
procedure DoOnTerminate(Sender : TObject);
|
|
protected
|
|
protected
|
|
Procedure DoRun; override;
|
|
Procedure DoRun; override;
|
|
|
|
+ Function CreateEventLog : TEventLog; virtual;
|
|
function InitializeWebHandler: TWebHandler; virtual; abstract;
|
|
function InitializeWebHandler: TWebHandler; virtual; abstract;
|
|
Procedure DoLog(EventType: TEventType; const Msg: String); override;
|
|
Procedure DoLog(EventType: TEventType; const Msg: String); override;
|
|
procedure SetTitle(const AValue: string); override;
|
|
procedure SetTitle(const AValue: string); override;
|
|
@@ -521,17 +522,24 @@ begin
|
|
result := FWebHandler.Email;
|
|
result := FWebHandler.Email;
|
|
end;
|
|
end;
|
|
|
|
|
|
-function TCustomWebApplication.GetEventLog: TEventLog;
|
|
|
|
|
|
+function TCustomWebApplication.CreateEventLog: TEventLog;
|
|
begin
|
|
begin
|
|
- if not assigned(FEventLog) then
|
|
|
|
|
|
+ Result:=TEventLog.Create(Nil);
|
|
|
|
+ With Result do
|
|
begin
|
|
begin
|
|
- FEventLog := TEventLog.Create(Nil);
|
|
|
|
- FEventLog.Name:=Self.Name+'Logger';
|
|
|
|
- FEventLog.Identification:=Title;
|
|
|
|
- FEventLog.RegisterMessageFile(ParamStr(0));
|
|
|
|
- FEventLog.LogType:=ltSystem;
|
|
|
|
- FEventLog.Active:=True;
|
|
|
|
|
|
+ Name:=Self.Name+'Logger';
|
|
|
|
+ Identification:=Title;
|
|
|
|
+ RegisterMessageFile(ParamStr(0));
|
|
|
|
+ LogType:=ltSystem;
|
|
|
|
+ Active:=True;
|
|
end;
|
|
end;
|
|
|
|
+end;
|
|
|
|
+
|
|
|
|
+function TCustomWebApplication.GetEventLog: TEventLog;
|
|
|
|
+
|
|
|
|
+begin
|
|
|
|
+ if not assigned(FEventLog) then
|
|
|
|
+ FEventLog := CreateEventLog;
|
|
Result := FEventLog;
|
|
Result := FEventLog;
|
|
end;
|
|
end;
|
|
|
|
|