logging

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package logging provides functions to create various logr.Logger implementations.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateDiscardLogger

func CreateDiscardLogger() logr.Logger

CreateDiscardLogger for testing

func CreateKlogLogger

func CreateKlogLogger() logr.Logger

CreateKlogLogger using Kubernetes klog

func CreateStdLogger

func CreateStdLogger(name string) logr.Logger

CreateStdLogger creates a logr.Logger using Go's standard log package

Types

type SyncLogger

type SyncLogger struct {
	Log  logr.Logger
	Sync func() error
}

SyncLogger contains a logger and an associated sync function that should be called using `defer`.

func CreateZapLogger

func CreateZapLogger(name string) (*SyncLogger, error)

CreateZapLogger for structured logging

Jump to

Keyboard shortcuts

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