log

package
v0.0.0-...-0f17f66 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2021 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LV_TRACE int = 0
	LV_DEBUG int = 1
	LV_INFO  int = 2
	LV_WARN  int = 3
	LV_ERROR int = 4
	LV_FATAL int = 5
	LV_PANIC int = 6
)

log 级别

Variables

This section is empty.

Functions

func CapitalLevelEncoder

func CapitalLevelEncoder(l zapcore.Level, enc zapcore.PrimitiveArrayEncoder)

func Debugf

func Debugf(ctx context.Context, format string, v ...interface{})

func Debugln

func Debugln(ctx context.Context, v ...interface{})

func Errorf

func Errorf(ctx context.Context, format string, v ...interface{})

func Fatalf

func Fatalf(ctx context.Context, format string, v ...interface{})

func Info

func Info(v ...interface{})

func Infof

func Infof(ctx context.Context, format string, v ...interface{})

func Infoln

func Infoln(ctx context.Context, v ...interface{})

func Init

func Init(logdir string, level string)

初始化

func InitV1

func InitV1(logDir, level string, maxSize int, maxAge, maxBackups int)

func NewLogger

func NewLogger(filename string, maxSize, maxAge, maxBackups int, localTime, compress bool) *lumberjack.Logger

func Panicf

func Panicf(ctx context.Context, format string, v ...interface{})

func Sync

func Sync()

func TimeEncoder

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

func Tracef

func Tracef(ctx context.Context, format string, v ...interface{})

func Traceln

func Traceln(ctx context.Context, v ...interface{})

func Warnf

func Warnf(ctx context.Context, format string, v ...interface{})

func Warnln

func Warnln(ctx context.Context, v ...interface{})

Types

This section is empty.

Jump to

Keyboard shortcuts

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