logs

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Standard log verbosity levels.
	// Use these instead of integers in venafi-kubernetes-agent code.
	Info  = 0
	Debug = 1
	Trace = 2
)

Variables

This section is empty.

Functions

func AddFlags added in v1.3.0

func AddFlags(fs *pflag.FlagSet)

AddFlags adds log related flags to the supplied flag set.

The split-stream options are enabled by default, so that errors are logged to stderr and info to stdout, allowing cloud logging systems to assign a severity INFO or ERROR to the messages.

func Initialize added in v1.3.0

func Initialize() error

Initialize uses k8s.io/component-base/logs, to configure the following global loggers: log, slog, and klog. All are configured to write in the same format.

Types

type LogToSlogWriter added in v1.3.0

type LogToSlogWriter struct {
	Slog   *slog.Logger
	Source string
}

func (LogToSlogWriter) Write added in v1.3.0

func (w LogToSlogWriter) Write(p []byte) (n int, err error)

Jump to

Keyboard shortcuts

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