log

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2024 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ColorFromName

func ColorFromName(name string) *color.Color

func ColorOfJSON

func ColorOfJSON(content string, keys ...string) *color.Color

func Format

func Format(text string, outputter *color.Color) string

func FormatGrep

func FormatGrep(text string, logFilter *regexp.Regexp, outputter *color.Color) string

Types

type Formatter

type Formatter func(a ...any) string

type Logger

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

func NewLogger

func NewLogger(resourceType, resourceName string, selector map[string]string, since time.Duration) Logger

func (Logger) Log

func (l Logger) Log(ctx context.Context, kube client.Kube) error

func (Logger) WithColorFilter

func (l Logger) WithColorFilter(colorFilter *color.Color) Logger

func (Logger) WithContainerRegexp

func (l Logger) WithContainerRegexp(containerRegexp *regexp.Regexp) Logger

func (Logger) WithDryRun

func (l Logger) WithDryRun(dryRun bool) Logger

func (Logger) WithInvertRegexp added in v0.6.0

func (l Logger) WithInvertRegexp(invertRegexp bool) Logger

func (Logger) WithJsonColorKeys

func (l Logger) WithJsonColorKeys(jsonColorKeys []string) Logger

func (Logger) WithLogRegexes added in v0.10.0

func (l Logger) WithLogRegexes(logRegexes []*regexp.Regexp) Logger

func (Logger) WithNoFollow added in v0.8.6

func (l Logger) WithNoFollow(noFollow bool) Logger

func (Logger) WithRawOutput

func (l Logger) WithRawOutput(rawOutput bool) Logger

Jump to

Keyboard shortcuts

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