#1 2015-03-08 19:01:24

zed
Member
From: Belarus
Registered: 2015-02-26
Posts: 102

SynLog: Problem with EchoToConsole

Hi. It seems, that "EchoToConsole" not work for me:

program SynLogTest;

{$APPTYPE CONSOLE}

uses
  SysUtils, SynLog, SynCommons;

procedure DoTest;
begin
  with TSynLog.Family do begin
    Level := LOG_VERBOSE;
    EchoToConsole := LOG_VERBOSE;
  end;
  TSynLog.Add.Log(sllDebug, StringToUTF8('Test message'));
  TSynLog.Add.Flush(True);
end;

begin
  try
    Writeln(SynCommons.SYNOPSE_FRAMEWORK_FULLVERSION); // 1.18.1048 FTS3
    DoTest;
    Readln;
  except
    on E:Exception do
      Writeln(E.Classname, ': ', E.Message);
  end;
end.

Log file is created and contains test message, but console output is empty.

Tested on Delphi 2007 and XE2.

Last edited by zed (2015-03-08 19:16:54)

Offline

#2 2015-03-08 19:49:16

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 13,274
Website

Re: SynLog: Problem with EchoToConsole

This was indeed a small regression.

Should be fixed by http://synopse.info/fossil/info/60623e2ada

Thanks for the report!

Offline

#3 2015-03-08 20:03:22

zed
Member
From: Belarus
Registered: 2015-02-26
Posts: 102

Re: SynLog: Problem with EchoToConsole

Fixed. Thanks.

Offline

Board footer

Powered by FluxBB