MCPcopy Create free account
hub / github.com/modelcontextprotocol/go-sdk / compareLevels

Function compareLevels

mcp/logging.go:65–67  ·  view source on GitHub ↗

compareLevels behaves like [cmp.Compare] for [LoggingLevel]s.

(l1, l2 LoggingLevel)

Source from the content-addressed store, hash-verified

63
64// compareLevels behaves like [cmp.Compare] for [LoggingLevel]s.
65func compareLevels(l1, l2 LoggingLevel) int {
66 return cmp.Compare(mcpLevelToSlog(l1), mcpLevelToSlog(l2))
67}
68
69// LoggingHandlerOptions are options for a LoggingHandler.
70type LoggingHandlerOptions struct {

Callers 1

LogMethod · 0.85

Calls 1

mcpLevelToSlogFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…