pub struct LoggingMessageNotification {
pub method: String,
pub params: LoggingMessageNotificationParams,
}Deprecated per SEP-2577 (2026-07-28). Replacement: log to stderr for stdio transports or use OpenTelemetry. Per-request log level opt-in lives on RequestMetaObject.log_level. Earliest removal: first release on/after 2027-07-28.
http and protocol-2026-07-28 only.Expand description
Core MCP protocol types and error handling
Notification for notifications/message.
Deprecated per SEP-2577 โ the whole Logging surface (this
notification, the per-request _meta logLevel opt-in, and the
LoggingLevel enum) is deprecated. Migrate to stderr (stdio) or
OpenTelemetry. Functional through the migration window.
Fieldsยง
ยงmethod: StringDeprecated per SEP-2577 (2026-07-28). Replacement: log to stderr for stdio transports or use OpenTelemetry. Per-request log level opt-in lives on RequestMetaObject.log_level. Earliest removal: first release on/after 2027-07-28.
Method name (always โnotifications/messageโ)
params: LoggingMessageNotificationParamsDeprecated per SEP-2577 (2026-07-28). Replacement: log to stderr for stdio transports or use OpenTelemetry. Per-request log level opt-in lives on RequestMetaObject.log_level. Earliest removal: first release on/after 2027-07-28.
Logging parameters
Implementationsยง
Sourceยงimpl LoggingMessageNotification
impl LoggingMessageNotification
Sourcepub fn new(level: LoggingLevel, data: Value) -> LoggingMessageNotification
pub fn new(level: LoggingLevel, data: Value) -> LoggingMessageNotification
Creates a log message notification with the given level and data.
Sourcepub fn with_logger(
self,
logger: impl Into<String>,
) -> LoggingMessageNotification
pub fn with_logger( self, logger: impl Into<String>, ) -> LoggingMessageNotification
Sets the name of the logger that produced the message and returns the notification.
Trait Implementationsยง
Sourceยงimpl Clone for LoggingMessageNotification
impl Clone for LoggingMessageNotification
Sourceยงfn clone(&self) -> LoggingMessageNotification
fn clone(&self) -> LoggingMessageNotification
1.0.0 (const: unstable) ยท Sourceยงfn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSourceยงimpl Debug for LoggingMessageNotification
impl Debug for LoggingMessageNotification
Sourceยงimpl<'de> Deserialize<'de> for LoggingMessageNotification
impl<'de> Deserialize<'de> for LoggingMessageNotification
Sourceยงfn deserialize<__D>(
__deserializer: __D,
) -> Result<LoggingMessageNotification, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<LoggingMessageNotification, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Sourceยงimpl LoggingMessageNotificationTrait for LoggingMessageNotification
impl LoggingMessageNotificationTrait for LoggingMessageNotification
Sourceยงfn method_string(&self) -> &str
fn method_string(&self) -> &str
Deprecated per SEP-2577 (2026-07-28). Replacement: stderr (stdio) or OpenTelemetry, plus per-request log-level opt-in. Earliest removal: first release on/after 2027-07-28.
"notifications/message".impl RpcNotification for LoggingMessageNotification
Sourceยงimpl Serialize for LoggingMessageNotification
impl Serialize for LoggingMessageNotification
Sourceยงfn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Auto Trait Implementationsยง
impl Forget for LoggingMessageNotification
impl Freeze for LoggingMessageNotification
impl Move for LoggingMessageNotification
impl RefUnwindSafe for LoggingMessageNotification
impl Send for LoggingMessageNotification
impl Sync for LoggingMessageNotification
impl Unpin for LoggingMessageNotification
impl UnsafeUnpin for LoggingMessageNotification
impl UnwindSafe for LoggingMessageNotification
Blanket Implementationsยง
Sourceยงimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Sourceยงfn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Sourceยงimpl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Sourceยงimpl<T> Instrument for T
impl<T> Instrument for T
Sourceยงfn instrument(self, span: Span) -> Instrumented<Self> โ
fn instrument(self, span: Span) -> Instrumented<Self> โ
Sourceยงfn in_current_span(self) -> Instrumented<Self> โ
fn in_current_span(self) -> Instrumented<Self> โ
Sourceยงimpl<T> IntoEither for T
impl<T> IntoEither for T
Sourceยงfn into_either(self, into_left: bool) -> Either<Self, Self> โ
fn into_either(self, into_left: bool) -> Either<Self, Self> โ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSourceยงfn into_either_with<F>(self, into_left: F) -> Either<Self, Self> โ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> โ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more