log

package
v0.0.0-...-8596d69 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2022 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug

func Debug(msg string, args ...interface{})

func Error

func Error(msg string, args ...interface{})

func HandleLog

func HandleLog(next http.Handler) http.Handler

func HandleLogFunc

func HandleLogFunc(next http.HandlerFunc) func(rw http.ResponseWriter, r *http.Request)

func Logger

func Logger() logger

func Warn

func Warn(msg string, args ...interface{})

Types

type HTTPLogger

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

HTTPLogger is a http.RoundTripper that logs requests and responses.

func NewHTTPLogger

func NewHTTPLogger(pluginID string, proxied http.RoundTripper, opts ...Options) *HTTPLogger

NewHTTPLogger creates a new HTTPLogger.

func (*HTTPLogger) RoundTrip

func (hl *HTTPLogger) RoundTrip(req *http.Request) (*http.Response, error)

RoundTrip implements the http.RoundTripper interface.

type Handler

type Handler struct {
	Plugin plugin
}

func (Handler) CheckHealth

func (Handler) QueryData

type Labels

type Labels map[string]string

type Options

type Options struct {
	EnabledFn func() bool
}

Jump to

Keyboard shortcuts

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