Documentation
¶
Index ¶
- type StructuredLogger
- func (sl *StructuredLogger) Close() error
- func (sl *StructuredLogger) CreateChildSpan(name string) (context.Context, trace.Span)
- func (sl *StructuredLogger) GetLogger() func(format string, args ...interface{})
- func (sl *StructuredLogger) IsOTELEnabled() bool
- func (sl *StructuredLogger) LogAccessibility(violations []interface{})
- func (sl *StructuredLogger) LogError(err error, msg string)
- func (sl *StructuredLogger) LogPerformance(metricName string, value float64, unit string)
- func (sl *StructuredLogger) Logf(format string, args ...interface{})
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type StructuredLogger ¶
type StructuredLogger struct {
// contains filtered or unexported fields
}
StructuredLogger provides structured logging with optional OpenTelemetry integration
func NewStructuredLogger ¶
func NewStructuredLogger(testName string) *StructuredLogger
NewStructuredLogger creates a new structured logger with optional OTEL span
func (*StructuredLogger) Close ¶
func (sl *StructuredLogger) Close() error
Close ends the span and flushes any buffered telemetry
func (*StructuredLogger) CreateChildSpan ¶
CreateChildSpan creates a nested span for a subtask
func (*StructuredLogger) GetLogger ¶
func (sl *StructuredLogger) GetLogger() func(format string, args ...interface{})
GetLogger returns a compatible logger function for TestContext
func (*StructuredLogger) IsOTELEnabled ¶
func (sl *StructuredLogger) IsOTELEnabled() bool
IsOTELEnabled returns whether OTEL is actively recording
func (*StructuredLogger) LogAccessibility ¶
func (sl *StructuredLogger) LogAccessibility(violations []interface{})
LogAccessibility logs accessibility violations
func (*StructuredLogger) LogError ¶
func (sl *StructuredLogger) LogError(err error, msg string)
LogError logs an error with context
func (*StructuredLogger) LogPerformance ¶
func (sl *StructuredLogger) LogPerformance(metricName string, value float64, unit string)
LogPerformance logs performance metrics
func (*StructuredLogger) Logf ¶
func (sl *StructuredLogger) Logf(format string, args ...interface{})
Logf logs a formatted message as an event
Click to show internal directories.
Click to hide internal directories.