logger

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2021 License: Apache-2.0 Imports: 5 Imported by: 1

Documentation

Overview

Package logger creates a logger for operators

Index

Constants

This section is empty.

Variables

View Source
var Trace bool

Trace is set to true if 'trace' level logging was configured. Since Zap doesn't have a trace level, this uses the debug level to fake it.

Functions

func New

func New(level string, options ...zap.Option) *zap.SugaredLogger

New creates a new logger with our setup

func NewControllerLogger

func NewControllerLogger(level string) *zap.SugaredLogger

NewControllerLogger returns a new logger, which does not include the ctxlog wrapper in caller annotations and sets up controller-runtime to use it

func TraceFilter

func TraceFilter(log *zap.SugaredLogger, name string) *zap.SugaredLogger

TraceFilter returns the debug logger if trace is enabled, otherwise a nop logger

func Unskip

func Unskip(log *zap.SugaredLogger, name string) *zap.SugaredLogger

Unskip removes the CallerSkip for the wrapper, i.e. ctxlog

Types

This section is empty.

Jump to

Keyboard shortcuts

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