Table of Contents

TTMSMCPServer.SendLogMessage Method

Sends a log record to connected clients as a notifications/message notification. This is the log channel the client actually sees, as opposed to the local OnLog trace, which never leaves the process.

API unit family: TMS.MCP.Server Declaring type: TTMSMCPServer Inherited from: TTMSMCPCustomServer

Syntax

procedure SendLogMessage(ALevel: TTMSMCPLogLevel; const ALogger, AData: string);

Remarks

Does nothing when no client has initialized. Clients select the severity they want to receive, reported by CurrentLogLevel; test it before building an expensive entry the client would discard.

Parameters

Name Description
ALevel Severity of the entry.
ALogger Optional name of the emitting logger or subsystem. Omitted from the notification when empty.
AData Payload of the entry.