Web forum is in read-only mode. Login as active registered customer for write access
  Forum Search   New Posts New Posts

Log to console

 Post Reply Post Reply
Author
Liew Laurence View Drop Down
New Member
New Member
Avatar

Joined: 17 Mar 2016
Posts: 17
Post Options Post Options   Quote Liew Laurence Quote  Post ReplyReply Direct Link To This Post Topic: Log to console
    Posted: 29 Sep 2019 at 10:43am
I am building console application in Windows (a XData Server), and would like to log some outputs to the console.

WriteLn('something');

works of course

but

TMSLogger.RegisterOutputHandlerClass(TTMSLoggerConsoleOutputHandler);
TMSLogger.Info('Starting server... ');

does not show up in the windows console
Back to Top
Wagner R. Landgraf View Drop Down
TMS Support
TMS Support
Avatar

Joined: 18 May 2010
Posts: 2485
Post Options Post Options   Quote Wagner R. Landgraf Quote  Post ReplyReply Direct Link To This Post Posted: 30 Sep 2019 at 10:46pm
To log to the Windows console you should use TTMSLoggerWindowsConsoleOutputHandler, declared in unit TMSLoggingWindowsConsoleOutputHandler:

TMSLogger.RegisterOutputHandlerClass(TTMSLoggerWindowsConsoleOutputHandler);
Back to Top
Liew Laurence View Drop Down
New Member
New Member
Avatar

Joined: 17 Mar 2016
Posts: 17
Post Options Post Options   Quote Liew Laurence Quote  Post ReplyReply Direct Link To This Post Posted: 01 Oct 2019 at 1:36am
How di I miss that! Thanks! It works.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down