log

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CurrentTurn

func CurrentTurn() int

CurrentTurn returns the current turn number

func Init

func Init() error

Init initializes the logger based on GEN_DEBUG env var

func IsEnabled

func IsEnabled() bool

IsEnabled returns whether debug logging is enabled

func LogError

func LogError(context string, err error)

LogError logs an error in human-readable format

func LogRequest

func LogRequest(providerName, model string, opts provider.CompletionOptions)

LogRequest logs an LLM request in human-readable format

func LogResponse

func LogResponse(providerName string, resp provider.CompletionResponse)

LogResponse logs an LLM response in human-readable format

func Logger

func Logger() *zap.Logger

Logger returns the underlying zap logger

func MessagesField

func MessagesField(messages []provider.Message) zap.Field

MessagesField creates a zap field for messages

func NextTurn

func NextTurn() int

NextTurn increments and returns the turn counter

func Sync

func Sync() error

Sync flushes any buffered log entries

func ToolCallsField

func ToolCallsField(toolCalls []provider.ToolCall) zap.Field

ToolCallsField creates a zap field for tool calls

func ToolsField

func ToolsField(tools []provider.Tool) zap.Field

ToolsField creates a zap field for tools

func UsageField

func UsageField(usage provider.Usage) zap.Field

UsageField creates a zap field for usage

Types

This section is empty.

Jump to

Keyboard shortcuts

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