How to display XData service status in a form?

I'm playing with the Swagger demo and the service part has a form with Start + Stop buttons. It only adds something to the memo when you click the Stop and Start buttons.

I'm curious what's needed to display service state data, say as debug traces. In a normal app you'd just write something like memo1.Lines.Add( 'something received: '+aStr );

In this case, I'd like to put something in the math functions to display the parameters and result. It's not so important WHAT is displayed, but I'm curious HOW. A lot of Windows services will have a form that displays what's going on in the service. So if it's an XData service, how can I display internal service state info in the main form?

Use TMS Logging for logging purposes. It provides several output handlers, memo is one of them (although not much recommended for production servers): Output Handlers | TMS Logging documentation