logext

package
v0.0.0-...-cd72d90 Latest Latest
Warning

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

Go to latest
Published: May 21, 2019 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetLoggerLevel

func GetLoggerLevel(lvl string) zapcore.Level

func InitLog

func InitLog(path, level string)

func LocalTimeEncoder

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

Types

type MLogger

type MLogger struct {
	Slogger *zap.SugaredLogger
}
var (
	Logger MLogger
)

func (*MLogger) DPanic

func (c *MLogger) DPanic(ctx context.Context, args ...interface{})

func (*MLogger) DPanicf

func (c *MLogger) DPanicf(template string, ctx context.Context, args ...interface{})

func (*MLogger) DPanicw

func (c *MLogger) DPanicw(ctx context.Context, msg string, args ...interface{})

func (*MLogger) Debug

func (c *MLogger) Debug(ctx context.Context, args ...interface{})

下面实现了zap方法的封装

func (*MLogger) Debugf

func (c *MLogger) Debugf(template string, ctx context.Context, args ...interface{})

func (*MLogger) Debugw

func (c *MLogger) Debugw(ctx context.Context, msg string, args ...interface{})

func (*MLogger) Error

func (c *MLogger) Error(ctx context.Context, args ...interface{})

func (*MLogger) Errorf

func (c *MLogger) Errorf(template string, ctx context.Context, args ...interface{})

func (*MLogger) Errorw

func (c *MLogger) Errorw(ctx context.Context, msg string, args ...interface{})

func (*MLogger) Fatal

func (c *MLogger) Fatal(ctx context.Context, args ...interface{})

func (*MLogger) Fatalf

func (c *MLogger) Fatalf(template string, ctx context.Context, args ...interface{})

func (*MLogger) Fatalw

func (c *MLogger) Fatalw(ctx context.Context, msg string, args ...interface{})

func (*MLogger) Info

func (c *MLogger) Info(ctx context.Context, args ...interface{})

func (*MLogger) Infof

func (c *MLogger) Infof(template string, ctx context.Context, args ...interface{})

func (*MLogger) Infow

func (c *MLogger) Infow(ctx context.Context, msg string, args ...interface{})

func (*MLogger) Panic

func (c *MLogger) Panic(ctx context.Context, args ...interface{})

func (*MLogger) Panicf

func (c *MLogger) Panicf(template string, ctx context.Context, args ...interface{})

func (*MLogger) Panicw

func (c *MLogger) Panicw(ctx context.Context, msg string, args ...interface{})

func (*MLogger) Warn

func (c *MLogger) Warn(ctx context.Context, args ...interface{})

func (*MLogger) Warnf

func (c *MLogger) Warnf(template string, ctx context.Context, args ...interface{})

func (*MLogger) Warnw

func (c *MLogger) Warnw(ctx context.Context, msg string, args ...interface{})

Jump to

Keyboard shortcuts

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