Back to godoc.org

Package logs

v0.16.1
Latest Go to latest

The latest major version is .

Published: Aug 7, 2020 | License: Apache-2.0 | Module: github.com/jetstack/cert-manager

Index

Constants

const (
	ResourceNameKey      = "resource_name"
	ResourceNamespaceKey = "resource_namespace"
	ResourceKindKey      = "resource_kind"

	RelatedResourceNameKey      = "related_resource_name"
	RelatedResourceNamespaceKey = "related_resource_namespace"
	RelatedResourceKindKey      = "related_resource_kind"
)

Variables

var (
	Log = klogr.New().WithName("cert-manager")

	ErrorLevel = 0
	WarnLevel  = 1
	InfoLevel  = 2
	DebugLevel = 3
)

func FlushLogs

func FlushLogs()

FlushLogs flushes logs immediately.

func FromContext

func FromContext(ctx context.Context, names ...string) logr.Logger

func InitLogs

func InitLogs(fs *flag.FlagSet)

InitLogs initializes logs the way we want for kubernetes.

func NewContext

func NewContext(ctx context.Context, l logr.Logger, names ...string) context.Context

func WithRelatedResource

func WithRelatedResource(l logr.Logger, obj metav1.Object) logr.Logger

func WithRelatedResourceName

func WithRelatedResourceName(l logr.Logger, name, namespace, kind string) logr.Logger

func WithResource

func WithResource(l logr.Logger, obj metav1.Object) logr.Logger

type GlogWriter

type GlogWriter struct{}

GlogWriter serves as a bridge between the standard log package and the glog package.

func (GlogWriter) Write

func (writer GlogWriter) Write(data []byte) (n int, err error)

Write implements the io.Writer interface.

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier