feat: deprecated logger in client & add Logger in ClientOption (#738)

Fix #708

1. deprecated logger in client
2. add Logger in ClientOption
3. add unit test for Logger
This commit is contained in:
FanOne 2026-01-05 23:41:31 +08:00 • committed by GitHub
commit 61be548803
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -58,7 +58,7 @@ type Server struct {
type ServerOptions struct {
// Optional instructions for connected clients.
Instructions string
// If non-nil, log server activity.
// Logger may be set to a non-nil value to enable logging of server activity.
Logger *slog.Logger
// If non-nil, called when "notifications/initialized" is received.
InitializedHandler func(context.Context, *InitializedRequest)