logger

package
v0.0.0-...-54c5aff Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	FieldComponent                = "component"
	FieldComponentName            = "component_name"
	FieldVarnishCluster           = "varnish_cluster"
	FieldOperatorVersion          = "operator_version"
	FieldVarnishControllerVersion = "varnish_controller_version"
	FieldFilePath                 = "file_path"
	FieldPodName                  = "pod_name"
	FieldNamespace                = "namespace"
)

Variables

This section is empty.

Functions

func ToContext

func ToContext(ctx context.Context, l *Logger) context.Context

Types

type Logger

type Logger struct {
	*zap.SugaredLogger
}

func FromContext

func FromContext(ctx context.Context) *Logger

func NewLogger

func NewLogger(format string, level zapcore.Level) *Logger

func NewNopLogger

func NewNopLogger() *Logger

func (*Logger) Infoc

func (l *Logger) Infoc(msg string, keysAndValues ...interface{})

Infoc provides conditional logging based on provided loglevel

func (*Logger) With

func (l *Logger) With(fields ...interface{}) *Logger

Jump to

Keyboard shortcuts

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