Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrChannelFull ... ErrChannelFull = errors.New("日志通道缓存已满,请取出数据") )
Functions ¶
func NewChannelWriter ¶
func NewChannelWriter(ChannelLen int) *logChannelWriter
NewChannelWriter ...
func StringToZapLevelHookFunc ¶
func StringToZapLevelHookFunc() mapstructure.DecodeHookFunc
StringToZapLevelHookFunc 将字符串转换为 zapcore.Level 类型 为 viper 使用
Types ¶
type LoggerSettingS ¶
type LoggerSettingS struct { LogLevel zapcore.Level `json:"log_level"` OutFile bool `json:"out_file"` FilePath string `json:"file_path"` MaxSize int `json:"max_size"` MaxBackups int `json:"max_backups"` MaxAge int `json:"max_age"` OutConsole bool `json:"out_console"` OutChannel bool `json:"out_channel"` ChannelEncodeType string `json:"channel_encode_type"` ChannelBufferLen int `json:"channel_buffer_len"` }
LoggerSettingS ...
type ZapPool ¶
type ZapPool struct { L *zap.Logger SL *zap.SugaredLogger // contains filtered or unexported fields }
ZapPool ...
func (ZapPool) GetLogSettings ¶
func (p ZapPool) GetLogSettings() *LoggerSettingS
PrintLogSettings 输出日志系统的配置信息
Click to show internal directories.
Click to hide internal directories.