logfilter

package
v1.27.1 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ColorizeProcess

func ColorizeProcess(line string) string

ColorizeProcess colorizes the [name] prefix based on the process name.

func NewContext

func NewContext(ctx context.Context, tui *TUI) context.Context

NewContext returns a new context with the TUI.

Types

type TUI

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

func FromContext

func FromContext(ctx context.Context) *TUI

FromContext returns the TUI from the context. Returns nil if it's not set.

func NewTUI

func NewTUI() *TUI

func (*TUI) Filter

func (t *TUI) Filter() string

Filter returns the current filter.

func (*TUI) Matches

func (t *TUI) Matches(line string) bool

Matches returns true if the line matches the filter.

func (*TUI) NewWriter

func (t *TUI) NewWriter() io.Writer

NewWriter returns a writer that sends log output through the TUI.

func (*TUI) Println

func (t *TUI) Println(line string)

Println sends a log line to the TUI or writes it directly if the TUI has stopped.

func (*TUI) Quit

func (t *TUI) Quit()

Quit shuts down the TUI.

func (*TUI) Start

func (t *TUI) Start(out io.Writer) error

Start runs the TUI in the terminal.

Jump to

Keyboard shortcuts

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