logger

package
v1.3.6 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug

func Debug(msg string, fields ...LogField)

func Error

func Error(err error, fields ...LogField)

func Fatal

func Fatal(msg string, fields ...LogField)

func Info

func Info(msg string, fields ...LogField)

func NewLogger

func NewLogger(name string, logFile string, logLevelName string, maxSize int, maxBackups int, maxAge int)

NewLogger 初始化日志

func Panic

func Panic(msg error, fields ...LogField)

func Warn

func Warn(msg string, fields ...LogField)

Types

type LogField

type LogField = zap.Field

隔离引用

func Any

func Any(key string, value interface{}) LogField

func Bool

func Bool(key string, val bool) LogField

func ByteString

func ByteString(key string, val []byte) LogField

func Duration

func Duration(key string, val time.Duration) LogField

func Float32

func Float32(key string, val float32) LogField

func Float64

func Float64(key string, val float64) LogField

func Int

func Int(key string, val int) LogField

func Int32

func Int32(key string, val int32) LogField

func Int64

func Int64(key string, val int64) LogField

func String

func String(key string, val string) LogField

func Time

func Time(key string, val time.Time) LogField

func Uintptr

func Uintptr(key string, val uintptr) LogField

Jump to

Keyboard shortcuts

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