traceId

package
v0.0.0-...-ac3b76c Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2024 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetTraceId

func GetTraceId(c *gin.Context) string

func SetTraceId

func SetTraceId(c *gin.Context, id string)

Types

type LogContext

type LogContext struct {
	Ctx    *gin.Context
	Msg    string
	Fields []zapcore.Field
}

func GetLogContext

func GetLogContext(c *gin.Context, msg string, fields ...zapcore.Field) *LogContext

func (*LogContext) Formatter

func (l *LogContext) Formatter() (string, []zapcore.Field)

Jump to

Keyboard shortcuts

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