httplog

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2024 License: MPL-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultMode = Errors

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"
	ShortURL Mode = "short-url"
	URL      Mode = "url"
	Headers  Mode = "headers"
	Body     Mode = "body"
	Errors   Mode = "errors"
)

func SplitNameMode added in v1.1.0

func SplitNameMode(val string) (name string, mode Mode, err error)

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