logger

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const TRACE_ID = "trace_id"

Variables

This section is empty.

Functions

func Log

func Log(ctx context.Context, err error) *log.Entry

func LogRequest

func LogRequest(req *http.Request)

func LogResponse

func LogResponse(res *http.Response)

func NewMiddleware added in v0.10.0

func NewMiddleware(h http.Handler) http.Handler

func WithClientTrace added in v0.10.0

func WithClientTrace(req *http.Request)

Inject ClientTrace into request's context and modify original request

Types

type LoggingMiddleware added in v0.10.0

type LoggingMiddleware struct {
	// contains filtered or unexported fields
}

func (*LoggingMiddleware) ServeHTTP added in v0.10.0

func (l *LoggingMiddleware) ServeHTTP(w http.ResponseWriter, req *http.Request)

Jump to

Keyboard shortcuts

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