logger

package
v0.0.0-...-506ee2d Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewZapLogger

func NewZapLogger(name string, logger *zap.Logger) func(next http.Handler) http.Handler

NewMiddleware returns a new Zap Middleware handler.

Types

type StatusRecorder

type StatusRecorder struct {
	http.ResponseWriter
	Status int
	Length int
}

StatusRecorder wraps a ResponseWriter and records the status code

func (*StatusRecorder) Write

func (r *StatusRecorder) Write(b []byte) (n int, err error)

Write Intercepts the status

func (*StatusRecorder) WriteHeader

func (r *StatusRecorder) WriteHeader(status int)

WriteHeader Intercepts the status

Jump to

Keyboard shortcuts

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