logger

package
v1.6.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 12, 2025 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateMlogLoggerWithOptions

func CreateMlogLoggerWithOptions(enableDebug bool, logFile string) (*mlog.Logger, error)

CreateMlogLoggerWithOptions creates an mlog.Logger with debug and file logging options This function sets up a fully configured logger and enables std log redirection

Types

type Logger

type Logger interface {
	Debug(msg string, keyValuePairs ...any)
	Info(msg string, keyValuePairs ...any)
	Warn(msg string, keyValuePairs ...any)
	Error(msg string, keyValuePairs ...any)
	Flush() error
}

Logger is a minimal logging interface that can be satisfied by both standalone (mlog) and embedded (pluginapi) logging implementations

func CreateDefaultLogger

func CreateDefaultLogger() (Logger, error)

CreateDefaultLogger creates a logger with sensible defaults for the MCP server

func CreateLoggerWithOptions

func CreateLoggerWithOptions(enableDebug bool, logFile string) (Logger, error)

CreateLoggerWithOptions creates a logger with debug and file logging options This function sets up a fully configured logger and enables std log redirection Returns the simplified Logger interface

func NewStandaloneLogger

func NewStandaloneLogger(logger *mlog.Logger) Logger

NewStandaloneLogger creates a Logger that wraps mlog.Logger

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL