log

package
v1.39.18 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseJSON added in v1.36.0

func ParseJSON(config latest.JSONParseConfig, line string) string

Types

type Formatter added in v1.30.0

type Formatter interface {
	Name() string

	PrintLine(io.Writer, string)
}

type Logger

type Logger interface {
	// Start starts the logger.
	Start(context.Context, io.Writer) error

	// Stop stops the logger.
	Stop()

	// Mute mutes the logger.
	Mute()

	// Unmute unmutes the logger.
	Unmute()

	// SetSince sets the original timestamp for the logger.
	SetSince(time.Time)

	// RegisterArtifacts tracks build artifacts inside of a logger.
	// The logger sometimes uses information about the currently deployed artifacts
	// to actually retrieve logs (e.g. the Kubernetes PodSelector). Thus, we need to
	// track the current build artifacts in the logger.
	RegisterArtifacts([]graph.Artifact)
}

Logger defines the behavior of the object that retrieves logs from deployed resources. Logger implementations are platform-specific, and are controlled by a single Deployer.

type LoggerMux added in v1.27.0

type LoggerMux []Logger

func (LoggerMux) Mute added in v1.27.0

func (l LoggerMux) Mute()

func (LoggerMux) RegisterArtifacts added in v1.27.0

func (l LoggerMux) RegisterArtifacts(artifacts []graph.Artifact)

func (LoggerMux) SetSince added in v1.27.0

func (l LoggerMux) SetSince(t time.Time)

func (LoggerMux) Start added in v1.27.0

func (l LoggerMux) Start(ctx context.Context, out io.Writer) error

func (LoggerMux) Stop added in v1.27.0

func (l LoggerMux) Stop()

func (LoggerMux) Unmute added in v1.27.0

func (l LoggerMux) Unmute()

type NoopLogger

type NoopLogger struct{}

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

func (*NoopLogger) Mute

func (n *NoopLogger) Mute()

func (*NoopLogger) RegisterArtifacts added in v1.27.0

func (n *NoopLogger) RegisterArtifacts(_ []graph.Artifact)

func (*NoopLogger) SetSince

func (n *NoopLogger) SetSince(time.Time)

func (*NoopLogger) Start added in v1.27.0

func (n *NoopLogger) Start(context.Context, io.Writer) error

func (*NoopLogger) Stop added in v1.27.0

func (n *NoopLogger) Stop()

func (*NoopLogger) Unmute

func (n *NoopLogger) Unmute()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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