LogMessageNotification

A typed notifications/message payload, per server/utilities/logging: the notification carries params: {level, logger?, data}. level is one of the eight LogLevel severities, logger an optional name of the emitting component, and data an arbitrary JSON value (commonly a string or object). Parsed from an inbound notification's params so clients receive a structured value rather than hand-parsing raw JSON.

Members

Static functions

fromJson
LogMessageNotification fromJson(Json params)

Parse the params object of a notifications/message. Tolerant of a missing/ill-typed payload (returns a default-valued struct).

Variables

data
Json data;

The log payload — any JSON value; Json.undefined if absent.

level
string level;

The severity level (raw string, as on the wire). Compare against LogLevel values; an unrecognised level is preserved verbatim.

logger
Nullable!string logger;

The optional name of the logger/component that emitted the message (null when the server omits it).