zap

package
v2.1.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	LogLevelInfo  = "info"
	LogLevelDebug = "debug"
	LogLevelWarn  = "warn"
	LogLevelError = "error"
)

Variables

View Source
var (
	Sugar *zap.SugaredLogger
)

Functions

func InitFileLog

func InitFileLog(logPath ...string)

func SetLogLevel

func SetLogLevel(logLevel string)

Types

type Zap added in v2.0.10

type Zap struct {
	logx.GLog
}

将文件输出到终端或者文件

func (*Zap) Debug added in v2.0.10

func (*Zap) Debug(args ...interface{})

func (*Zap) DebugF added in v2.0.10

func (*Zap) DebugF(format string, args ...interface{})

func (*Zap) Error added in v2.0.10

func (*Zap) Error(args ...interface{})

func (*Zap) ErrorF added in v2.0.10

func (*Zap) ErrorF(format string, args ...interface{})

func (*Zap) Info added in v2.0.10

func (*Zap) Info(args ...interface{})

func (*Zap) InfoF added in v2.0.10

func (*Zap) InfoF(format string, args ...interface{})

func (*Zap) Warn added in v2.0.10

func (*Zap) Warn(args ...interface{})

func (*Zap) WarnF added in v2.0.10

func (*Zap) WarnF(format string, args ...interface{})

Jump to

Keyboard shortcuts

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