LoggingMessageNotification

@Serializable
data class LoggingMessageNotification(val level: LoggingLevel, val logger: String? = null, val data: JsonObject = EmptyJsonObject, val _meta: JsonObject = EmptyJsonObject) : ServerNotification, WithMeta(source)

org.jetbrains.kotlinx.mcp.Notification of a log message passed from server to client. If no logging level request has been sent from the client, the server MAY decide which messages to send automatically.

Constructors

Link copied to clipboard
constructor(level: LoggingLevel, logger: String? = null, data: JsonObject = EmptyJsonObject, _meta: JsonObject = EmptyJsonObject)

Types

Link copied to clipboard
@Serializable
data class SetLevelRequest(val level: LoggingLevel, val _meta: JsonObject = EmptyJsonObject) : ClientRequest, WithMeta

A request from the client to the server to enable or adjust logging.

Properties

Link copied to clipboard
open override val _meta: JsonObject

The protocol reserves this result property to allow clients and servers to attach additional metadata to their responses.

Link copied to clipboard
val data: JsonObject

The data to be logged, such as a string message or an object. Any JSON serializable type is allowed here.

Link copied to clipboard

The severity of this log message.

Link copied to clipboard
val logger: String? = null

An optional name of the logger issuing this message.

Link copied to clipboard
open override val method: Method

Functions

Link copied to clipboard

Converts the notification to a JSON-RPC notification.