|
@@ -52,8 +52,8 @@ Type
|
|
|
procedure SetFileName(const Value: String);
|
|
|
procedure ActivateSystemLog;
|
|
|
function DefaultFileName: String;
|
|
|
- procedure WriteFileLog(EventType : TEventType; Msg: String);
|
|
|
- procedure WriteSystemLog(EventType: TEventType; Msg: String);
|
|
|
+ procedure WriteFileLog(EventType : TEventType; const Msg: String);
|
|
|
+ procedure WriteSystemLog(EventType: TEventType; const Msg: String);
|
|
|
procedure DeActivateFileLog;
|
|
|
procedure DeActivateSystemLog;
|
|
|
procedure CheckIdentification;
|
|
@@ -71,18 +71,18 @@ Type
|
|
|
Function EventTypeToString(E : TEventType) : String;
|
|
|
Function RegisterMessageFile(AFileName : String) : Boolean; virtual;
|
|
|
Function UnRegisterMessageFile : Boolean; virtual;
|
|
|
- Procedure Log (EventType : TEventType; Msg : String); {$ifndef fpc }Overload;{$endif}
|
|
|
- Procedure Log (EventType : TEventType; Fmt : String; Args : Array of const); {$ifndef fpc }Overload;{$endif}
|
|
|
- Procedure Log (Msg : String); {$ifndef fpc }Overload;{$endif}
|
|
|
- Procedure Log (Fmt : String; Args : Array of const); {$ifndef fpc }Overload;{$endif}
|
|
|
- Procedure Warning (Msg : String); {$ifndef fpc }Overload;{$endif}
|
|
|
- Procedure Warning (Fmt : String; Args : Array of const); {$ifndef fpc }Overload;{$endif}
|
|
|
- Procedure Error (Msg : String); {$ifndef fpc }Overload;{$endif}
|
|
|
- Procedure Error (Fmt : String; Args : Array of const); {$ifndef fpc }Overload;{$endif}
|
|
|
- Procedure Debug (Msg : String); {$ifndef fpc }Overload;{$endif}
|
|
|
- Procedure Debug (Fmt : String; Args : Array of const); {$ifndef fpc }Overload;{$endif}
|
|
|
- Procedure Info (Msg : String); {$ifndef fpc }Overload;{$endif}
|
|
|
- Procedure Info (Fmt : String; Args : Array of const); {$ifndef fpc }Overload;{$endif}
|
|
|
+ Procedure Log (EventType : TEventType; const Msg : String); {$ifndef fpc }Overload;{$endif}
|
|
|
+ Procedure Log (EventType : TEventType; const Fmt : String; Args : Array of const); {$ifndef fpc }Overload;{$endif}
|
|
|
+ Procedure Log (const Msg : String); {$ifndef fpc }Overload;{$endif}
|
|
|
+ Procedure Log (const Fmt : String; Args : Array of const); {$ifndef fpc }Overload;{$endif}
|
|
|
+ Procedure Warning (const Msg : String); {$ifndef fpc }Overload;{$endif}
|
|
|
+ Procedure Warning (const Fmt : String; Args : Array of const); {$ifndef fpc }Overload;{$endif}
|
|
|
+ Procedure Error (const Msg : String); {$ifndef fpc }Overload;{$endif}
|
|
|
+ Procedure Error (const Fmt : String; Args : Array of const); {$ifndef fpc }Overload;{$endif}
|
|
|
+ Procedure Debug (const Msg : String); {$ifndef fpc }Overload;{$endif}
|
|
|
+ Procedure Debug (const Fmt : String; Args : Array of const); {$ifndef fpc }Overload;{$endif}
|
|
|
+ Procedure Info (const Msg : String); {$ifndef fpc }Overload;{$endif}
|
|
|
+ Procedure Info (const Fmt : String; Args : Array of const); {$ifndef fpc }Overload;{$endif}
|
|
|
Published
|
|
|
Property Identification : String Read FIdentification Write SetIdentification;
|
|
|
Property LogType : TLogType Read Flogtype Write SetlogType;
|
|
@@ -126,12 +126,12 @@ begin
|
|
|
Raise ELogError.Create(SErrOperationNotAllowed);
|
|
|
end;
|
|
|
|
|
|
-procedure TEventLog.Debug(Fmt: String; Args: array of const);
|
|
|
+procedure TEventLog.Debug(const Fmt: String; Args: array of const);
|
|
|
begin
|
|
|
Debug(Format(Fmt,Args));
|
|
|
end;
|
|
|
|
|
|
-procedure TEventLog.Debug(Msg: String);
|
|
|
+procedure TEventLog.Debug(const Msg: String);
|
|
|
begin
|
|
|
Log(etDebug,Msg);
|
|
|
end;
|
|
@@ -142,38 +142,38 @@ begin
|
|
|
Active:=True;
|
|
|
end;
|
|
|
|
|
|
-procedure TEventLog.Error(Fmt: String; Args: array of const);
|
|
|
+procedure TEventLog.Error(const Fmt: String; Args: array of const);
|
|
|
begin
|
|
|
Error(Format(Fmt,Args));
|
|
|
end;
|
|
|
|
|
|
-procedure TEventLog.Error(Msg: String);
|
|
|
+procedure TEventLog.Error(const Msg: String);
|
|
|
begin
|
|
|
Log(etError,Msg);
|
|
|
end;
|
|
|
|
|
|
-procedure TEventLog.Info(Fmt: String; Args: array of const);
|
|
|
+procedure TEventLog.Info(const Fmt: String; Args: array of const);
|
|
|
begin
|
|
|
Info(Format(Fmt,Args));
|
|
|
end;
|
|
|
|
|
|
-procedure TEventLog.Info(Msg: String);
|
|
|
+procedure TEventLog.Info(const Msg: String);
|
|
|
begin
|
|
|
Log(etInfo,Msg);
|
|
|
end;
|
|
|
|
|
|
-procedure TEventLog.Log(Msg: String);
|
|
|
+procedure TEventLog.Log(const Msg: String);
|
|
|
begin
|
|
|
Log(DefaultEventType,msg);
|
|
|
end;
|
|
|
|
|
|
-procedure TEventLog.Log(EventType: TEventType; Fmt: String;
|
|
|
+procedure TEventLog.Log(EventType: TEventType; const Fmt: String;
|
|
|
Args: array of const);
|
|
|
begin
|
|
|
Log(EventType,Format(Fmt,Args));
|
|
|
end;
|
|
|
|
|
|
-procedure TEventLog.Log(EventType: TEventType; Msg: String);
|
|
|
+procedure TEventLog.Log(EventType: TEventType; const Msg: String);
|
|
|
begin
|
|
|
EnsureActive;
|
|
|
Case FlogType of
|
|
@@ -182,7 +182,7 @@ begin
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
-procedure TEventLog.WriteFileLog(EventType : TEventType; Msg : String);
|
|
|
+procedure TEventLog.WriteFileLog(EventType : TEventType; const Msg : String);
|
|
|
|
|
|
Var
|
|
|
S,TS,T : String;
|
|
@@ -204,7 +204,7 @@ begin
|
|
|
Raise ELogError.CreateFmt(SErrLogFailedMsg,[S]);
|
|
|
end;
|
|
|
|
|
|
-procedure TEventLog.Log(Fmt: String; Args: array of const);
|
|
|
+procedure TEventLog.Log(const Fmt: String; Args: array of const);
|
|
|
begin
|
|
|
Log(Format(Fmt,Args));
|
|
|
end;
|
|
@@ -267,12 +267,12 @@ begin
|
|
|
Flogtype := Value;
|
|
|
end;
|
|
|
|
|
|
-procedure TEventLog.Warning(Fmt: String; Args: array of const);
|
|
|
+procedure TEventLog.Warning(const Fmt: String; Args: array of const);
|
|
|
begin
|
|
|
Warning(Format(Fmt,Args));
|
|
|
end;
|
|
|
|
|
|
-procedure TEventLog.Warning(Msg: String);
|
|
|
+procedure TEventLog.Warning(const Msg: String);
|
|
|
begin
|
|
|
Log(etWarning,Msg);
|
|
|
end;
|