log

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultOptions added in v0.2.3

func DefaultOptions() options

DefaultOptions creates default options

func LoggingMiddleware

func LoggingMiddleware(logger log.Logger, handler http.Handler, opts options) http.Handler

LoggingMiddleware provides log middleware that log request and response.

Types

type Decider added in v0.2.3

type Decider func(req *http.Request, status int) bool

Decider defines rules for surpressing log

func DefaultDecider added in v0.2.3

func DefaultDecider() Decider

DefaultDecider returns always true decider

func SkipPrometheusDecider added in v0.2.3

func SkipPrometheusDecider() Decider

SkipPrometheusDecider returns common skip prometheus /metric

Jump to

Keyboard shortcuts

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