log

package
v1.0.17 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug

func Debug(args ...interface{})

Debug log

func Debugf added in v1.0.1

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

Debugf log

func Error

func Error(args ...interface{})

Error log

func Errorf added in v1.0.1

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

Errorf log

func Fatal

func Fatal(args ...interface{})

Fatal send log fatal

func Fatalf added in v1.0.1

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

Fatalf send log fatalf

func Info

func Info(args ...interface{})

Info log

func Infof added in v1.0.1

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

Infof log

func Init

func Init(c *Config)

Init initialize a log config .

func TimeEncoder

func TimeEncoder(t time.Time, enc zapcore.PrimitiveArrayEncoder)

TimeEncoder time encoder .

func Warn

func Warn(args ...interface{})

Warn log

func Warnf added in v1.0.1

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

Warnf log

Types

type Config

type Config struct {
	LogPath   string // 日志存放路径
	AppName   string // 应用名称
	Debug     bool   // 是否开启Debug模式
	MultiFile bool   // 多文件模式根据日志级别生成文件
}

Config is log config .

Jump to

Keyboard shortcuts

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