Documentation
¶
Index ¶
- Constants
- func CopyLogContext(ctx context.Context) context.Context
- func GetLogContext(ctx context.Context) []any
- func GetLogContextValue(ctx context.Context, key string) (value any, ok bool)
- func GetLogContextValueAsString(ctx context.Context, key string) (value string, ok bool)
- func GetLogTrackContext(ctx context.Context) (reqId string, traId string)
- func NewId() string
- func NewTrackLogContext(ctx context.Context) context.Context
- func SetLogContextKeyStringValueIfNotEmpty(ctx context.Context, key string, value string) context.Context
- func SetLogContextKeyValue(ctx context.Context, key string, value any) context.Context
- func SetTrackLogContext(ctx context.Context, reqId string, traId string) context.Context
- type LogValues
Constants ¶
View Source
const ArrayLimit = 100
View Source
const CtxRequestId = "reqId"
View Source
const CtxTraceId = "traId"
View Source
const GinCtxRequestIdKeyStr = "x-req-id"
View Source
const GinCtxTraceIdKeyStr = "x-tra-id"
View Source
const LogContextKeyStr = ctxKey("LCK")
View Source
const UnnamedKeyStr = "unnamed"
Variables ¶
This section is empty.
Functions ¶
func GetLogContext ¶
func GetLogContextValue ¶
func SetLogContextKeyValue ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.