zaplog

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2021 License: Apache-2.0 Imports: 7 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 Info

func Info(args ...interface{})

func Infof

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

func Init

func Init(cfg *LogConfig) *zap.Logger

func Printf added in v1.1.0

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

func Warn

func Warn(args ...interface{})

func Warnf

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

Types

type LogConfig

type LogConfig struct {
	Filename       string        // 日志文件
	WithMaxAge     time.Duration // 日志保留时间
	IsPrintConsole bool          // 开发模式会输出日志到标准输出
	FileSplitTime  time.Duration // 日志文件拆分时间间隔 time.Hour*24
	DaySplit       bool          // 日志是否按天分割
}

Jump to

Keyboard shortcuts

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