Documentation
¶
Overview ¶
Package httplog traces and logs the requests a net/http server answers, with the logs set up by the telemetry package
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Options ¶
type Options struct {
// Levels are the levels requests are logged at, by how they ended
Levels telemetry.RequestLevels
// Public ignores the trace id a caller sends, so each request starts its own trace
Public bool
// Path is what a request's path is logged as, such as with an email address
// in it replaced. The path itself when nil.
Path func(*http.Request) string
// OnPanic answers a request whose handler panicked, after the panic is
// logged, unless the handler had started its answer. A plain 500 when nil.
OnPanic func(http.ResponseWriter)
}
Options are how Handler traces and logs requests
Click to show internal directories.
Click to hide internal directories.