httplog

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2023 License: MPL-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Logger

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

func NewLogger

func NewLogger(logFunc func(format string, args ...any), mode Mode) *Logger

NewLogger returns a logger that logs HTTP requests and responses.

func (*Logger) LogFunc

func (l *Logger) LogFunc() middleware.Logger

type Mode

type Mode string
const (
	None    Mode = "none"
	Route   Mode = "route"
	URL     Mode = "url"
	Headers Mode = "headers"
	Body    Mode = "body"
	Errors  Mode = "errors"
)

func (Mode) String

func (m Mode) String() string

Jump to

Keyboard shortcuts

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