X-Git-Url: http://deadsoftware.ru/gitweb?p=d2df-sdl.git;a=blobdiff_plain;f=src%2Fengine%2Fe_log.pas;h=e524c1a1a9f522e70191ef1543af9d132912e254;hp=e82bfb41149a0533db9173023bafbfe3cce249d2;hb=0968d19494ddf24230a822c02acbe3a3334bc3ad;hpb=cd0c726308c335c662384b41d9e23af0457290f7 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;