logger

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RequestIdKey contextKey = "request_id_ctx"
	RequestId    string     = "request_id"
)

Variables

This section is empty.

Functions

func AddValueToContextLogger

func AddValueToContextLogger(ctx context.Context, key string, value interface{}) context.Context

AddValueToContextLogger adds new key-value in the existing logger present in context

func Init

func Init()

Init initializes logrus

func Logger

func Logger(ctx context.Context) *logrus.Entry

Logger Return a reference of logrus.Entry with request_id set field

func WithRequestId

func WithRequestId(ctx context.Context, requestId types.UID) context.Context

WithRequestId Create a copy of context with requestid added

Types

This section is empty.

Jump to

Keyboard shortcuts

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