Source File
logger.go
Belonging Package
github.com/mark3labs/mcp-go/util
package utilimport ()// Logger defines a minimal logging interfacetype Logger interface {Infof(format string, v ...any)Errorf(format string, v ...any)}// --- Standard Library Logger Wrapper ---// DefaultStdLogger implements Logger using the standard library's log.Logger.func () Logger {return &stdLogger{logger: log.Default(),}}// stdLogger wraps the standard library's log.Logger.type stdLogger struct {logger *log.Logger}func ( *stdLogger) ( string, ...any) {.logger.Printf("INFO: "+, ...)}func ( *stdLogger) ( string, ...any) {.logger.Printf("ERROR: "+, ...)}
![]() |
The pages are generated with Golds v0.8.4. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |