ctxlog

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2024 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BaggageFrom

func BaggageFrom(ctx context.Context) []interface{}

BaggageFrom is used to extract the baggage from a context. Useful for testing

Types

type LevelLogger

type LevelLogger interface {
	log.Logger
	Debug(keyvals ...interface{})
	Info(keyvals ...interface{})
	Warn(keyvals ...interface{})
	Error(keyvals ...interface{})
}

type Provider

type Provider interface {
	For(ctx context.Context) LevelLogger
	ContextWith(ctx context.Context, keyvals ...interface{}) context.Context
	ContextWithRequest(r *http.Request) context.Context
	Logger() log.Logger
}

func NewProvider

func NewProvider(logger log.Logger) Provider

Jump to

Keyboard shortcuts

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