Documentation
¶
Index ¶
- func ClearLogs()
- func Disable()
- func Enable()
- func IsEnabled() bool
- func Log(level string, message string, fields map[string]interface{})
- func PrintStats()
- func Trace(name string) func()
- func WithContext(ctx context.Context) context.Context
- type ContextKey
- type DebugLog
- type Debugger
- func (d *Debugger) ClearLogs()
- func (d *Debugger) Disable()
- func (d *Debugger) Enable()
- func (d *Debugger) GetLogs() []DebugLog
- func (d *Debugger) IsEnabled() bool
- func (d *Debugger) Log(level string, message string, fields map[string]interface{})
- func (d *Debugger) PrintStats()
- func (d *Debugger) StartProfile(profileType ProfileType, filename string) (func(), error)
- func (d *Debugger) TraceFunction(name string) func()
- type ProfileType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DebugLog ¶
type DebugLog struct {
Timestamp time.Time
Level string
Message string
Fields map[string]interface{}
}
DebugLog represents a debug log entry
type Debugger ¶
type Debugger struct {
// contains filtered or unexported fields
}
Debugger provides debugging utilities for the RAG engine
func FromContext ¶
FromContext gets the debugger from context
func (*Debugger) StartProfile ¶
func (d *Debugger) StartProfile(profileType ProfileType, filename string) (func(), error)
StartProfile starts profiling
func (*Debugger) TraceFunction ¶
TraceFunction traces function execution time
type ProfileType ¶
type ProfileType string
ProfileType represents the type of profile
const ( ProfileCPU ProfileType = "cpu" ProfileMemory ProfileType = "memory" ProfileGoroutine ProfileType = "goroutine" )
Click to show internal directories.
Click to hide internal directories.