X-Git-Url: https://deadsoftware.ru/gitweb?a=blobdiff_plain;f=src%2Fengine%2Fe_log.pas;h=e524c1a1a9f522e70191ef1543af9d132912e254;hb=844441154d1220d6c83f75043300c2851ec87109;hp=e82bfb41149a0533db9173023bafbfe3cce249d2;hpb=7fe9b42bd8a5a8fdbc3b22d87f1a14cd438a9e11;p=d2df-sdl.git diff --git a/src/engine/e_log.pas b/src/engine/e_log.pas index e82bfb4..e524c1a 100644 --- a/src/engine/e_log.pas +++ b/src/engine/e_log.pas @@ -15,6 +15,9 @@ procedure e_WriteLog(TextLine: String; RecordCategory: TRecordCategory; WriteTime: Boolean = True); function DecodeIPV4(ip: LongWord): string; +var + e_WriteToStdOut: Boolean = False; + implementation var @@ -33,6 +36,7 @@ procedure e_WriteLog(TextLine: String; RecordCategory: TRecordCategory; var LogFile: TextFile; Prefix: ShortString = ''; + OutStr: String; begin if FileName = '' then Exit; @@ -54,9 +58,12 @@ begin MSG_NOTIFY: Prefix := '***'; end; if WriteTime then - Writeln(LogFile, '['+TimeToStr(Time)+'] '+Prefix+' '+TextLine) + OutStr := '['+TimeToStr(Time)+'] '+Prefix+' '+TextLine else - Writeln(LogFile, Prefix+' '+TextLine); + OutStr := Prefix+' '+TextLine; + Writeln(LogFile, OutStr); + if e_WriteToStdOut then + Writeln(OutStr); finally Close(LogFile); end;