logger

package
v0.0.0-...-6562851 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Logger *zap.Logger
)

Functions

func Init

func Init(cfg Cfg, hooks ...func(zapcore.Entry) error)

Init 创建自定义zap logger对象

Types

type Cfg

type Cfg struct {
	MaxAge      int    `json:"max_age" toml:"max_age"`
	Maxsize     int    `json:"max_size" toml:"max_size"`
	ErrLog      string `json:"err_log" toml:"err_log"`
	WarnLog     string `json:"warn_log" toml:"warn_log"`
	InfoLog     string `json:"info_log" toml:"info_log"`
	MaxBackups  int    `json:"max_backups" toml:"max_backups"`
	Compress    bool   `json:"compress" toml:"compress"`
	JsonEncoder bool   `json:"json_encoder" toml:"json_encoder"`
}

Jump to

Keyboard shortcuts

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