diff --git a/src/engine/e_log.pas b/src/engine/e_log.pas
index afc638cac7be82a9d7af6a0f1eb764811adf4eb8..937730d5d4fd822260f19fbbe9d42861c8ef4192 100644 (file)
--- a/src/engine/e_log.pas
+++ b/src/engine/e_log.pas
procedure e_InitWritelnDriver ();
procedure e_LogWritefln (const fmt: AnsiString; args: array of const; category: TRecordCategory=MSG_NOTIFY; writeTime: Boolean=true);
+procedure e_LogWriteln (const s: AnsiString; category: TRecordCategory=MSG_NOTIFY; writeTime: Boolean=true);
var
@@ -68,54 +69,12 @@ procedure e_WriteLog (TextLine: String; RecordCategory: TRecordCategory; WriteTi
begin
e_LogWritefln('%s', [TextLine], RecordCategory, WriteTime);
end;
-(*
-var
- LogFile: TextFile;
- Prefix: ShortString = '';
- OutStr: String;
-begin
- if driverInited and (length(TextLine) > 0) then
- begin
- case RecordCategory of
- MSG_FATALERROR: write('FATAL: ');
- MSG_WARNING: write('WARNING: ');
- end;
- writeln(TextLine);
- end;
- if FileName = '' then Exit;
- Assign(LogFile, FileName);
- try
- if FileExists(FileName) then
- Append(LogFile)
- else
- Rewrite(LogFile);
- try
- if FirstRecord then
- begin
- Writeln(LogFile, '--- Log started at '+TimeToStr(Time)+' ---');
- FirstRecord := False;
- end;
- case RecordCategory of
- MSG_FATALERROR: Prefix := '!!!';
- MSG_WARNING: Prefix := '! ';
- MSG_NOTIFY: Prefix := '***';
- end;
- if WriteTime then
- OutStr := '['+TimeToStr(Time)+'] '+Prefix+' '+TextLine
- else
- OutStr := Prefix+' '+TextLine;
- Writeln(LogFile, OutStr);
- if e_WriteToStdOut then
- Writeln(OutStr);
- finally
- Close(LogFile);
- end;
- except // sorry
- end;
+procedure e_LogWriteln (const s: AnsiString; category: TRecordCategory=MSG_NOTIFY; writeTime: Boolean=true);
+begin
+ e_LogWritefln('%s', [s], category, writeTime);
end;
-*)
// returns formatted string if `writerCB` is `nil`, empty string otherwise