log

package
v1.0.0-alpha.2 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Debug  = int(zapcore.DebugLevel) * -1
	Info   = int(zapcore.InfoLevel) * -1
	Warn   = int(zapcore.WarnLevel) * -1
	Error  = int(zapcore.ErrorLevel) * -1
	DPanic = int(zapcore.DPanicLevel) * -1
	Panic  = int(zapcore.PanicLevel) * -1
	Fatal  = int(zapcore.FatalLevel) * -1

	FieldError = "error"
)

Variables

LoggerSet provides everything required for a logger. nolint: gochecknoglobals

Functions

func NewEncoder

func NewEncoder(encoderConf zapcore.EncoderConfig, level zap.AtomicLevel) (zapcore.Encoder, error)

func NewEncoderConfig

func NewEncoderConfig() zapcore.EncoderConfig

func NewLogger

func NewLogger(zapLogger *zap.Logger) logr.Logger

func NewSink

func NewSink() (zapcore.WriteSyncer, func(), error)

func NewZapLevel

func NewZapLevel(conf Config) (zap.AtomicLevel, error)

func NewZapLogger

func NewZapLogger(encoder zapcore.Encoder, level zap.AtomicLevel, sink zapcore.WriteSyncer) (*zap.Logger, func())

Types

type Config

type Config struct {
	Level string `mapstructure:"level"`
}

Jump to

Keyboard shortcuts

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