@@ -17,13 +17,15 @@ interface
1717
1818procedure info (const AMessage: String); overload;
1919procedure info (const AFormat: String; AValues: array of const );overload;
20+ procedure error (const AMessage: String); overload;
21+ procedure error (const AFormat: String; AValues: array of const );overload;
2022procedure debug (const AMessage: String); overload;
2123procedure debug (const AFormat: String; AValues: array of const );overload;
2224
2325implementation
2426
2527type
26- TLogLevel = (llInfo, llDebug);
28+ TLogLevel = (llInfo, llError, llDebug);
2729
2830var
2931 dateTimeStr: String;
@@ -35,6 +37,9 @@ procedure log(const ALevel: TLogLevel; const AMessage: String);
3537 llInfo:begin
3638 WriteLn(dateTimeStr, ' [INF]: ' , AMessage);
3739 end ;
40+ llError:begin
41+ WriteLn(dateTimeStr, ' [ERR]: ' , AMessage);
42+ end ;
3843 llDebug:begin
3944 WriteLn(dateTimeStr, ' [DBG]: ' , AMessage);
4045 end ;
@@ -52,6 +57,16 @@ procedure info(const AFormat: String; AValues: array of const);
5257 Log(llInfo, Format(AFormat, AValues));
5358end ;
5459
60+ procedure error (const AMessage: String);
61+ begin
62+ Log(llError, AMessage);
63+ end ;
64+
65+ procedure error (const AFormat: String; AValues: array of const );
66+ begin
67+ Log(llError, Format(AFormat, AValues));
68+ end ;
69+
5570procedure debug (const AMessage: String);
5671begin
5772 if DebugOn then
0 commit comments