zaplog

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

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 added in v1.2.5

func Fatal(args ...interface{})

func Fatalf added in v1.2.5

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

func GetExeName added in v1.1.3

func GetExeName() string
func DPanic(args ...interface{}) {
	logLogger.DPanic(args...)
}
func DPanicf(template string, args ...interface{}) {
	logLogger.DPanicf(template, args...)
}
func Panic(args ...interface{}) {
	logLogger.Panic(args...)
}
func Panicf(template string, args ...interface{}) {
	logLogger.Panicf(template, args...)
}
func Fatal(args ...interface{}) {
	logLogger.Fatal(args...)
}
func Fatalf(template string, args ...interface{}) {
	logLogger.Fatalf(template, args...)
}

func GetLogWriter added in v1.2.0

func GetLogWriter() io.Writer

func Info

func Info(args ...interface{})

func Infof

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

func Init

func Init(cfg *LogConfig) *zap.Logger

func Warn

func Warn(args ...interface{})

func Warnf

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

Types

type LogConfig

type LogConfig struct {
	LogDir         string
	WithMaxAge     time.Duration // 日志保留时间
	IsPrintConsole bool          // 开发模式会输出日志到标准输出
	FileSplitTime  time.Duration // 日志文件拆分时间间隔 time.Hour*24
	Level          string
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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