Set the minimum severity of notifications/message the server should
emit to this client.
On a released protocol (<= 2025-11-25) this sends the logging/setLevel
RPC. The draft (2026-07-28) REMOVED that RPC (SEP-2575/2577): a conformant
draft server answers logging/setLevel with -32601 and emits no
notifications/message for any request that does not carry
_meta["io.modelcontextprotocol/logLevel"]. So on a draft-negotiated
session this does NOT send the removed RPC; instead it records level as
the sticky per-request opt-in that injectModernMeta stamps onto every
subsequent request's _meta (see withRequestLogLevel and
RequestOptions.logLevel for a single-request override). Passing
an empty level clears the draft opt-in.
Typed entry point: pass a LogLevel for compile-time safety, so an invalid
level name can never reach the wire. Forwards to the string overload (whose
runtime validation always passes for a LogLevel).
Set the minimum severity of notifications/message the server should emit to this client.
On a released protocol (<= 2025-11-25) this sends the logging/setLevel RPC. The draft (2026-07-28) REMOVED that RPC (SEP-2575/2577): a conformant draft server answers logging/setLevel with -32601 and emits no notifications/message for any request that does not carry _meta["io.modelcontextprotocol/logLevel"]. So on a draft-negotiated session this does NOT send the removed RPC; instead it records level as the sticky per-request opt-in that injectModernMeta stamps onto every subsequent request's _meta (see withRequestLogLevel and RequestOptions.logLevel for a single-request override). Passing an empty level clears the draft opt-in.
Typed entry point: pass a LogLevel for compile-time safety, so an invalid level name can never reach the wire. Forwards to the string overload (whose runtime validation always passes for a LogLevel).