logger

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2020 License: Apache-2.0 Imports: 5 Imported by: 3 modules, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

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