log

package
v1.1.4 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DebugLevel = func(level zapcore.Level) bool {
		return level == zap.DebugLevel
	}

	InfoLevel = func(level zapcore.Level) bool {
		return level == zap.InfoLevel
	}

	ErrorLevel = func(level zapcore.Level) bool {
		return level > zap.InfoLevel
	}
)

Functions

func GetLogger

func GetLogger() *zap.SugaredLogger

GetLogger 获取日志对象

func GetWrite

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

func Init

func Init(path string, maxSize, maxBackups, maxAge int, compress bool, logMap map[string]Level)

Init 初始化日志参数

Types

type Level

type Level func(level zapcore.Level) bool

Jump to

Keyboard shortcuts

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