mcp: set default logging level to info (#411)
During initialization, the default logging level is set to info allowing servers to emit logs immediately without waiting for a client to set a log level. The updated example shows how to send a notification in the context of the request. Fixes #387
This commit is contained in:
parent
a1eb4849b7
commit
4257528dde
1 changed files with 5 additions and 1 deletions
|
|
@ -282,6 +282,7 @@ func (h *StreamableHTTPHandler) ServeHTTP(w http.ResponseWriter, req *http.Reque
|
|||
if !hasInitialized {
|
||||
state.InitializedParams = new(InitializedParams)
|
||||
}
|
||||
state.LogLevel = "info"
|
||||
connectOpts = &ServerSessionOptions{
|
||||
State: state,
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue