Documentation ¶
Index ¶
- Constants
- Variables
- func FromContext(ctx context.Context) logr.Logger
- func NewContext(ctx context.Context, logger logr.Logger) context.Context
- func NewEncoder(encoderConf zapcore.EncoderConfig, level zap.AtomicLevel) (zapcore.Encoder, error)
- func NewEncoderConfig() zapcore.EncoderConfig
- func NewLogger(zapLogger *zap.Logger) logr.Logger
- func NewSink() (zapcore.WriteSyncer, func(), error)
- func NewZapLevel(conf Config) (zap.AtomicLevel, error)
- func NewZapLogger(encoder zapcore.Encoder, level zap.AtomicLevel, sink zapcore.WriteSyncer) (*zap.Logger, func())
- type Config
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 ¶
View Source
var LoggerSet = wire.NewSet( NewEncoderConfig, NewZapLevel, NewSink, NewEncoder, NewZapLogger, NewLogger, )
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 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 ¶
Click to show internal directories.
Click to hide internal directories.