logger

package
v1.39.7 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2023 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config interface {
	Tail() bool
	PipelineForImage(imageName string) (latest.Pipeline, bool)
	DefaultPipeline() latest.Pipeline
	JSONParseConfig() latest.JSONParseConfig
}

type Formatter added in v1.30.0

type Formatter func(pod v1.Pod, containerStatus v1.ContainerStatus, isMuted func() bool) log.Formatter

type LogAggregator

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

LogAggregator aggregates the logs for all the deployed pods.

func NewLogAggregator

func NewLogAggregator(cli *kubectl.CLI, podSelector kubernetes.PodSelector, namespaces *[]string, config Config) *LogAggregator

NewLogAggregator creates a new LogAggregator for a given output.

func (*LogAggregator) GetFormatter added in v1.30.0

func (a *LogAggregator) GetFormatter() Formatter

func (*LogAggregator) IsMuted

func (a *LogAggregator) IsMuted() bool

IsMuted says if the logs are to be muted.

func (*LogAggregator) Mute

func (a *LogAggregator) Mute()

Mute mutes the logs.

func (*LogAggregator) RegisterArtifacts added in v1.27.0

func (a *LogAggregator) RegisterArtifacts(artifacts []graph.Artifact)

RegisterArtifacts tracks the provided build artifacts in the colorpicker

func (*LogAggregator) SetSince

func (a *LogAggregator) SetSince(t time.Time)

func (*LogAggregator) Start added in v1.24.1

func (a *LogAggregator) Start(ctx context.Context, out io.Writer) error

Start starts a logger that listens to pods and tail their logs if they are matched by the `podSelector`.

func (*LogAggregator) Stop added in v1.24.1

func (a *LogAggregator) Stop()

Stop stops the logger.

func (*LogAggregator) Unmute

func (a *LogAggregator) Unmute()

Unmute unmutes the logs.

type Logger added in v1.30.0

type Logger interface {
	log.Logger
	GetFormatter() Formatter
}

type NoopLogger added in v1.30.0

type NoopLogger struct {
	*log.NoopLogger
}

NoopLogger is used in tests. It will never retrieve any logs from any resources.

func (*NoopLogger) GetFormatter added in v1.30.0

func (*NoopLogger) GetFormatter() Formatter

Jump to

Keyboard shortcuts

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