Print Page | Close Window

Forwarding ReceivedOutputInformation

Printed From: TMS Software
Category: Developer Tools
Forum Name: DEV Logging
Forum Discription:
URL: http://www.tmssoftware.com/site/forum/forum_posts.asp?TID=12982
Printed Date: 12 Dec 2019 at 7:17pm


Topic: Forwarding ReceivedOutputInformation
Posted By: Hädrich Frank
Subject: Forwarding ReceivedOutputInformation
Date Posted: 07 Feb 2019 at 3:54pm
Hello TMS Team,

I want to centralize the logging of my services and applications using the tcp logging server. 

In the "TMSLoggerTCPServerReceivedOutputInformation" event of the TCP LoggingServer I receive the type of TTMSLoggerOutputInformation. 
Is it possible to forward the TTMSLoggerOutputInformation received on the TCP Logging Server directly to an other OutputHandler, e.g. Browser?



Replies:
Posted By: Pieter Scheldeman
Date Posted: 07 Feb 2019 at 4:18pm
Hi,

Each OutputHandler has a protected method

procedure Log(const AOutputInformation: TTMSLoggerOutputInformation);

You can try by using a protected class wrapper to call the method and pass the outputinformation directly:

type
  TTMSLoggerOutputHandlerOpen = class(TTMSLoggerOutputHandler);
...
TTMSLoggerOutputHandlerOpen(MyOutputHandler).Log(info);


Posted By: Hädrich Frank
Date Posted: 08 Feb 2019 at 11:19am
Perfect!
Great Work!

Many Thanks





Print Page | Close Window