Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type LangGoConfig ¶
type LangGoConfig struct { Conf *config.Configuration Once *sync.Once }
LangGoConfig 自定义Log
type LangGoLogger ¶
LangGoLogger 自定义Logger结构
func (*LangGoLogger) NewContext ¶
func (lg *LangGoLogger) NewContext(ctx *gin.Context, fields ...zapcore.Field)
NewContext 给指定的context添加字段 这里的loggerKey是全局变量,所以调用方直接声明变量就能访问到
func (*LangGoLogger) WithContext ¶
func (lg *LangGoLogger) WithContext(ctx *gin.Context) *zap.Logger
WithContext 从指定的context返回一个zap实例
Click to show internal directories.
Click to hide internal directories.