zap

package
v0.0.0-...-c42b9c9 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug

func Debug(v ...interface{})

func Debugf

func Debugf(s string, v ...interface{})

func Debugw

func Debugw(s string, v ...interface{})

func Error

func Error(v ...interface{})

func Errorf

func Errorf(s string, v ...interface{})

func Errorw

func Errorw(s string, v ...interface{})

func Fatal

func Fatal(v ...interface{})

func Fatalf

func Fatalf(s string, v ...interface{})

func Fatalw

func Fatalw(s string, v ...interface{})

func Info

func Info(v ...interface{})

func Infof

func Infof(s string, v ...interface{})

格式化日志

func Infow

func Infow(s string, v ...interface{})

这个函数接受一个键值对(key-value)形式的参数,用于指定日志消息的上下文信息。这种格式适用于需要记录具有结构化数据的日志

func InitLog

func InitLog() error

Please set the ZapFactory parameter before calling

func Sync

func Sync()

Types

type ZapFactory

type ZapFactory struct {
	Level       string
	PathName    string
	LogFileName string
	MaxSize     int // 文件大小限制,单位MB
	MaxBackups  int // 最大保留日志文件数量
	MaxAge      int // 日志文件保留天数
}
var (
	Factory ZapFactory
)

Jump to

Keyboard shortcuts

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