services

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CustomTimeEncoder

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

CustomTimeEncoder 自定义日志输出时间格式

func NewNiceLog

func NewNiceLog(params ...interface{}) (interface{}, error)

func Zap

func Zap(config contract.Config) (logger *zap.Logger)

Types

type NiceLog

type NiceLog struct {
	// 五个必要参数
	Zap *zap.Logger
	// contains filtered or unexported fields
}

NiceLog 的通用实例

func (*NiceLog) Debug

func (log *NiceLog) Debug(msg string, fields ...zapcore.Field)

func (*NiceLog) Error

func (log *NiceLog) Error(msg string, fields ...zapcore.Field)

func (*NiceLog) Fatal

func (log *NiceLog) Fatal(msg string, fields ...zapcore.Field)

func (*NiceLog) GetZap

func (log *NiceLog) GetZap() *zap.Logger

func (*NiceLog) Info

func (log *NiceLog) Info(msg string, fields ...zapcore.Field)

func (*NiceLog) Panic

func (log *NiceLog) Panic(msg string, fields ...zapcore.Field)

func (*NiceLog) Trace

func (log *NiceLog) Trace(msg string, fields ...zapcore.Field)

func (*NiceLog) Warn

func (log *NiceLog) Warn(msg string, fields ...zapcore.Field)

Jump to

Keyboard shortcuts

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