logger

package
v1.7.2 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Error added in v1.6.5

func Error(message string, attrs ...slog.Attr)

Error logs error message using the global logger

func Info added in v1.6.5

func Info(message string, attrs ...slog.Attr)

Info logs informational message using the global logger

func LogError added in v1.6.5

func LogError(operation string, err error, attrs ...slog.Attr)

LogError logs error information using the global logger

func LogExecution added in v1.6.5

func LogExecution(operation string, iteration int, message string, attrs ...slog.Attr)

LogExecution logs execution information using the global logger

func LogToolExecution added in v1.6.5

func LogToolExecution(toolName string, success bool, duration time.Duration, attrs ...slog.Attr)

LogToolExecution logs tool execution information using the global logger

func SetGlobalLogger added in v1.6.5

func SetGlobalLogger(l *Logger)

SetGlobalLogger sets the global logger instance

func Warn added in v1.6.5

func Warn(message string, attrs ...slog.Attr)

Warn logs warning message using the global logger

Types

type Logger

type Logger struct {
	// contains filtered or unexported fields
}

Logger structured logger

func GetLogger added in v1.6.5

func GetLogger() *Logger

GetLogger returns the global logger instance

func NewLogger

func NewLogger() *Logger

NewLogger creates a new logger

func NewLoggerWithConfig added in v1.6.3

func NewLoggerWithConfig(cfg *LoggerConfig) *Logger

NewLoggerWithConfig creates a new logger with specific configuration

func (*Logger) Error added in v1.6.5

func (l *Logger) Error(message string, attrs ...slog.Attr)

Error logs error message

func (*Logger) Info

func (l *Logger) Info(message string, attrs ...slog.Attr)

Info logs informational message

func (*Logger) LogError

func (l *Logger) LogError(operation string, err error, attrs ...slog.Attr)

LogError logs error information

func (*Logger) LogExecution

func (l *Logger) LogExecution(operation string, iteration int, message string, attrs ...slog.Attr)

LogExecution logs execution information

func (*Logger) LogToolExecution

func (l *Logger) LogToolExecution(toolName string, success bool, duration time.Duration, attrs ...slog.Attr)

LogToolExecution logs tool execution information

func (*Logger) Warn added in v1.6.3

func (l *Logger) Warn(message string, attrs ...slog.Attr)

Warn logs warning message

type LoggerConfig added in v1.6.3

type LoggerConfig struct {
	Silent   bool
	FilePath string
}

LoggerConfig logging configuration

Jump to

Keyboard shortcuts

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