mzap

package module
v0.0.0-...-1d4fcd2 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Glog *zap.Logger

Functions

func InitZap

func InitZap(zapConfig *ZapConfig)
mzap.InitZap(&mzap.ZapConfig{
	Level:         "error",
	Format:        "console",
	Prefix:        "[mzap]",
	Director:      "log",
	LinkName:      "latest_log",
	ShowLine:      true,
	EncodeLevel:   "LowercaseColorLevelEncoder",
	StacktraceKey: "stacktrace",
	LogInConsole:  true,
})

Types

type ZapConfig

type ZapConfig struct {
	Level         string // 级别
	Format        string // 输出
	Prefix        string // 日志前缀
	Director      string // 日志文件夹
	LinkName      string // 软链接名称
	ShowLine      bool   // 显示行
	EncodeLevel   string // 编码级
	StacktraceKey string // 栈名
	LogInConsole  bool   // 输出控制台
}

Jump to

Keyboard shortcuts

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