log

package
v0.0.0-...-9b5dd32 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const LOGGER_KEY = "zapLogger"

Variables

This section is empty.

Functions

This section is empty.

Types

type Logger

type Logger struct {
	*zap.Logger
}

func NewLog

func NewLog(conf *viper.Viper) *Logger

func (*Logger) NewContext

func (l *Logger) NewContext(ctx *gin.Context, fields ...zapcore.Field)

NewContext 给指定的context添加字段

func (*Logger) WithContext

func (l *Logger) WithContext(ctx *gin.Context) *Logger

WithContext 从指定的context返回一个zap实例

Jump to

Keyboard shortcuts

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