using System.Text.Json; using System.Text.Json.Serialization; namespace ModelContextProtocol.Protocol; /// /// Represents the parameters used with a /// notification sent whenever a log message is generated. /// /// /// /// Logging notifications allow servers to communicate diagnostic information to clients with varying severity levels. /// Clients can filter these messages based on the and properties. /// /// /// If no request has been sent from the client, the server may decide which /// messages to send automatically. /// /// /// See the schema for details. /// /// public sealed class LoggingMessageNotificationParams : NotificationParams { /// /// Gets or sets the severity of this log message. /// [JsonPropertyName("level")] public required LoggingLevel Level { get; set; } /// /// Gets or sets an optional name of the logger issuing this message. /// /// /// /// typically represents a category or component in the server's logging system. /// The logger name is useful for filtering and routing log messages in client applications. /// /// /// When implementing custom servers, choose clear, hierarchical logger names to help /// clients understand the source of log messages. /// /// [JsonPropertyName("logger")] public string? Logger { get; set; } /// /// Gets or sets the data to be logged, such as a string message. /// [JsonPropertyName("data")] public JsonElement? Data { get; set; } }