zaplog

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ZapLogger *zap.Logger

Functions

func InitLogger

func InitLogger(cfg *LogConfig)

Types

type LogConfig

type LogConfig struct {
	Filename   string `json:"Filename" yaml:"Filename"`
	MaxSize    int    `json:"MaxSize" yaml:"MaxSize"`
	MaxAge     int    `json:"MaxAge" yaml:"MaxAge"`
	MaxBackups int    `json:"MaxBackups" yaml:"MaxBackups"`
	//LocalTime  bool   `json:"LocalTime" yaml:"LocalTime"`
	Compress bool `json:"Compress" yaml:"Compress"`

	// 日志级别
	Level zapcore.Level `json:"Level" yaml:"Level"` // - 1 =》 5

	//是否空值台输出
	StdoutFLag bool `json:"StdoutFLag" yaml:"StdoutFLag"`
}

Jump to

Keyboard shortcuts

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