logger

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2026 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EventBusPublisher

type EventBusPublisher interface {
	PublishTaskLog(testRunID, taskIndex uint64, taskName, taskID, level, message string, fields map[string]any)
}

EventBusPublisher defines the interface for publishing log events.

type LogReader

type LogReader interface {
	GetLogEntries(from, limit uint64) []*db.TaskLog
	GetLogEntryCount() uint64
}

func NewLogDBReader

func NewLogDBReader(database *db.Database, testRunID, taskID uint64) LogReader

type LogScope

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

func NewLogger

func NewLogger(options *ScopeOptions) *LogScope

func (*LogScope) Flush

func (ls *LogScope) Flush()

func (*LogScope) GetLogEntries

func (ls *LogScope) GetLogEntries(from, limit uint64) []*db.TaskLog

func (*LogScope) GetLogEntryCount

func (ls *LogScope) GetLogEntryCount() uint64

func (*LogScope) GetLogger

func (ls *LogScope) GetLogger() *logrus.Logger

type ScopeOptions

type ScopeOptions struct {
	Parent     logrus.FieldLogger
	BufferSize uint64
	FlushDelay time.Duration
	Database   *db.Database
	EventBus   EventBusPublisher
	TestRunID  uint64
	TaskID     uint64
	TaskName   string
	TaskRefID  string
}

Jump to

Keyboard shortcuts

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