logger

package
v0.0.0-...-2e3c39d Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

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

func (sl *StructuredLogger) CreateChildSpan(name string) (context.Context, trace.Span)

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

Jump to

Keyboard shortcuts

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