Send a log message notification.
(
self,
level: types.LoggingLevel,
data: Any,
logger: str | None = None,
related_request_id: types.RequestId | None = None,
)
| 101 | |
| 102 | @deprecated("The logging capability is deprecated as of 2026-07-28 (SEP-2577).", category=MCPDeprecationWarning) |
| 103 | async def send_log_message( |
| 104 | self, |
| 105 | level: types.LoggingLevel, |
| 106 | data: Any, |
| 107 | logger: str | None = None, |
| 108 | related_request_id: types.RequestId | None = None, |
| 109 | ) -> None: |
| 110 | """Send a log message notification.""" |
| 111 | await self.send_notification( |
| 112 | types.LoggingMessageNotification( |
| 113 | params=types.LoggingMessageNotificationParams( |
| 114 | level=level, |
| 115 | data=data, |
| 116 | logger=logger, |
| 117 | ), |
| 118 | ), |
| 119 | related_request_id, |
| 120 | ) |
| 121 | |
| 122 | async def send_resource_updated(self, uri: str | AnyUrl) -> None: |
| 123 | """Send a resource updated notification.""" |