zap

package
v0.0.19 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const CallerSkip int = 1

Variables

This section is empty.

Functions

func DPanic

func DPanic(args ...interface{})

func DPanicf

func DPanicf(template string, args ...interface{})

func Debug

func Debug(args ...interface{})

func Debugf

func Debugf(template string, args ...interface{})

func Error

func Error(args ...interface{})

func Errorf

func Errorf(template string, args ...interface{})

func Fatal

func Fatal(args ...interface{})

func Fatalf

func Fatalf(template string, args ...interface{})

func Info

func Info(args ...interface{})

func Infof

func Infof(template string, args ...interface{})

func InitLogger

func InitLogger(logconf *ZaplogConf)

func Panic

func Panic(args ...interface{})

func Panicf

func Panicf(template string, args ...interface{})

func SetLevel

func SetLevel(level string)

func Warn

func Warn(args ...interface{})

func Warnf

func Warnf(template string, args ...interface{})

Types

type ZaplogConf added in v0.0.12

type ZaplogConf struct {
	EnableConsole bool   `toml:"enableConsole"`
	Filename      string `toml:"filename"`
	LogLevel      string `toml:"logLevel"`
	DailyBackup   bool   `toml:"dailyBackup"`
	// unit:MB
	MaxSize    int `toml:"maxSize"`
	MaxBackups int `toml:"maxBackups"`
	// unit:day
	MaxAge int `toml:"maxAge"`
}

Jump to

Keyboard shortcuts

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