logtailer

package
v0.0.0-...-f88c608 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2025 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LogTailer

type LogTailer interface {
	// Logs returns the channel through which the LogTailer returns Juju logs.
	// It will be closed when the tailer stops.
	Logs() <-chan *corelogger.LogRecord

	// Dying returns a channel which will be closed as the LogTailer stops.
	Dying() <-chan struct{}

	// Kill implements worker.Kill.
	Kill()

	// Wait implements worker.Wait.
	Wait() error
}

LogTailer allows for retrieval of Juju's logs. It first returns any matching already recorded logs and then waits for additional matching logs as they appear.

func NewLogTailer

func NewLogTailer(
	modelUUID, logFile string, params LogTailerParams,
) (LogTailer, error)

NewLogTailer returns a LogTailer which returns lines from a log file and filters according to the parameters given.

type LogTailerParams

type LogTailerParams struct {
	StartTime     time.Time
	MinLevel      corelogger.Level
	InitialLines  int
	Firehose      bool
	NoTail        bool
	IncludeEntity []string
	ExcludeEntity []string
	IncludeModule []string
	ExcludeModule []string
	IncludeLabels map[string]string
	ExcludeLabels map[string]string
	FromTheStart  bool
}

LogTailerParams specifies the filtering a LogTailer should apply to log records in order to decide which to return.

Jump to

Keyboard shortcuts

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