logging

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2025 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetLoggingHooks

func GetLoggingHooks() *server.Hooks

func InitLogger

func InitLogger(levelStr string, transportType string) *slog.Logger

func LogInitializeLLMCapabilities

func LogInitializeLLMCapabilities(sampling bool, openAI bool, openAIBaseURL *string, openAIModelName *string)

func LogOpenAIRequest

func LogOpenAIRequest(ctx context.Context, modelName string, messages []mcp.PromptMessage) context.Context

func LogOpenAIResponse

func LogOpenAIResponse(ctx context.Context, modelName string, responseModel interface{})

func LogSamplingModelRequest

func LogSamplingModelRequest(ctx context.Context, messages []mcp.PromptMessage) context.Context

func LogSamplingModelResponse

func LogSamplingModelResponse(ctx context.Context, responseModel interface{})

func ParseLevel

func ParseLevel(s string) (slog.Level, error)

Types

type LoggingTransport

type LoggingTransport struct {
	Transport http.RoundTripper
}

LoggingTransport wraps an http.RoundTripper to add structured logging

func (*LoggingTransport) RoundTrip

func (t *LoggingTransport) RoundTrip(req *http.Request) (*http.Response, error)

RoundTrip implements http.RoundTripper interface

Jump to

Keyboard shortcuts

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