log

package
v0.0.0-...-48ef5be Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Ctx

func Ctx(ctx context.Context) *zerolog.Logger

func DeferLogger

func DeferLogger(ctx context.Context, loss int64, err error, recove interface{}) *zerolog.Event

func FormatTime

func FormatTime(t time.Time, buf []byte) []byte

formatDate 自己实现的format函数比time.Format()性能要好

func GetOutput

func GetOutput() io.Writer

func GinGet

func GinGet(ctx *gin.Context) *zerolog.Logger

func GinWithLogid

func GinWithLogid(ctx *gin.Context, logid int64) *zerolog.Logger

func Init

func Init(ctx context.Context, conf config.Log) (err error)

func Level

func Level(l string) (zerolog.Level, error)

func Logid

func Logid(ctx context.Context) (logid int64, ok bool)

func New

func New(writer ...io.Writer) *zerolog.Logger

func WithLogid

func WithLogid(ctx context.Context, logid int64) (context.Context, *zerolog.Logger)

Types

This section is empty.

Jump to

Keyboard shortcuts

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