Help us shape the future of Go! Take the 2026 Go Developer Survey

logging

package
v0.0.37 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildAttributes

func BuildAttributes(ctx context.Context, r *http.Request, extra ...interface{}) []interface{}

Headers are json.Marshaled, but if that fails, the headers are sent to kusto as the original map[string]string The function logs to ApiRequestLog to notify users of the error if they wish to fix it

func NewLogging

func NewLogging(logger *log.Logger) mux.MiddlewareFunc

more info about http handler here: https://pkg.go.dev/net/http#Handler

Types

type RequestLogData added in v0.0.34

type RequestLogData struct {
	Code     int
	Duration time.Duration
	Error    string
}

Jump to

Keyboard shortcuts

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