gwlog

package
v1.87.1 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2024 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Log

type Log struct {
	*logger.ReqInfo
}

Log is a wrapper around logger.ReqInfo for keeping track of gateway request info. It is primarily useful for logging middleware using a separate context value than what minio uses, which we can't get at due to the way it creates new context when each gateway handler is called.

func FromContext

func FromContext(ctx context.Context) (*Log, bool)

FromContext gets a Log from context.

func New

func New() *Log

New returns a new Log.

func (*Log) TagValue

func (log *Log) TagValue(key string) string

TagValue returns the value for the given key in tags, if it exists.

func (*Log) WithContext

func (log *Log) WithContext(ctx context.Context) context.Context

WithContext returns a copy of the parent context with Log value.

Jump to

Keyboard shortcuts

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