example

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2020 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitZap

func InitZap() *zap.Logger

func NewEncoderConfig

func NewEncoderConfig() zapcore.EncoderConfig

func NewLogrusLogger

func NewLogrusLogger() *logrus.Logger

func TimeEncoder

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

格式化时间

Types

type Args

type Args struct {
}

type DefaultFieldHook

type DefaultFieldHook struct {
}

自定义Hook 接口

func (*DefaultFieldHook) Fire

func (hook *DefaultFieldHook) Fire(entry *logrus.Entry) error

func (*DefaultFieldHook) Levels

func (hook *DefaultFieldHook) Levels() []logrus.Level

type Reply

type Reply struct {
}

Jump to

Keyboard shortcuts

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