log

package
v0.0.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InjectCtx

func InjectCtx(l *zap.Logger, ctx context.Context) *zap.Logger

InjectCtx 日志注入上下文

func LevelEncoder

func LevelEncoder(l zapcore.Level, enc zapcore.PrimitiveArrayEncoder)

func TimeEncoder

func TimeEncoder(t time.Time, enc zapcore.PrimitiveArrayEncoder)

Types

type Loggers

type Loggers struct {
	// contains filtered or unexported fields
}

func GetLogger

func GetLogger() *Loggers

func NewLogger

func NewLogger(opts ...Option) *Loggers

func (*Loggers) Debug

func (l *Loggers) Debug(i ...interface{})

func (*Loggers) Debugf

func (l *Loggers) Debugf(format string, args ...interface{})

func (*Loggers) Error

func (l *Loggers) Error(i ...interface{})

func (*Loggers) Errorf

func (l *Loggers) Errorf(format string, args ...interface{})

func (*Loggers) Fatal

func (l *Loggers) Fatal(i ...interface{})

func (*Loggers) Fatalf

func (l *Loggers) Fatalf(format string, args ...interface{})

func (*Loggers) Fatalln

func (l *Loggers) Fatalln(i ...interface{})

func (*Loggers) GetZapLog

func (l *Loggers) GetZapLog() *zap.Logger

func (*Loggers) Info

func (l *Loggers) Info(i ...interface{})

func (*Loggers) Infof

func (l *Loggers) Infof(format string, args ...interface{})

func (*Loggers) Panic

func (l *Loggers) Panic(i ...interface{})

func (*Loggers) Panicf

func (l *Loggers) Panicf(format string, args ...interface{})

func (*Loggers) Panicln

func (l *Loggers) Panicln(i ...interface{})

func (*Loggers) Print

func (l *Loggers) Print(i ...interface{})

func (*Loggers) Printf

func (l *Loggers) Printf(format string, args ...interface{})

func (*Loggers) Println

func (l *Loggers) Println(args ...interface{})

func (*Loggers) Warn

func (l *Loggers) Warn(i ...interface{})

func (*Loggers) Warnf

func (l *Loggers) Warnf(format string, args ...interface{})

func (*Loggers) WithContext

func (l *Loggers) WithContext(ctx context.Context) *Loggers

type Option

type Option interface {
	// contains filtered or unexported methods
}

An Option configures a Logger.

func Development

func Development() Option

func Production

func Production() Option

Jump to

Keyboard shortcuts

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