ctxval

package
v0.0.0-...-e2de2ce Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2022 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Logger

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

Logger returns the main logger with context fields or the standard global logger when the main logger was not set.

func TraceId

func TraceId(ctx context.Context) string

TraceId returns request id or an empty string when not set.

func WithLogger

func WithLogger(ctx context.Context, logger *zerolog.Logger) context.Context

func WithTraceId

func WithTraceId(ctx context.Context, id string) context.Context

Types

This section is empty.

Jump to

Keyboard shortcuts

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