log

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetWrite

func GetWrite(path string, maxSize, maxBackups, maxAge int, compress bool) io.Writer

Types

type LoggerParam

type LoggerParam struct {
	Path       string `json:"path" xml:"path" toml:"path"`                    // 日志文件路径
	MaxSize    int    `json:"max_size" xml:"maxSize" toml:"maxSize"`          // 日志最大存储量
	MaxBackups int    `json:"max_backups" xml:"maxBackups" toml:"maxBackups"` // 日志最大备份数
	MaxAge     int    `json:"max_age" xml:"maxAge" toml:"maxAge"`             // 日志最大存储天数
	Compress   bool   `json:"compress" xml:"compress" toml:"compress"`        // 是否压缩
	// contains filtered or unexported fields
}

LoggerParam 日志参数

func (*LoggerParam) New

func (log *LoggerParam) New(logs map[string]func(level zapcore.Level) bool) *zap.SugaredLogger

New 创建Uber日志对象

Jump to

Keyboard shortcuts

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