chimiddleware

package
v0.0.0-...-8909857 Latest Latest
Warning

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

Go to latest
Published: May 17, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RequestID

func RequestID(ctx context.Context) zap.Field

func RequestLogger

func RequestLogger(logger *zap.SugaredLogger) func(next http.Handler) http.Handler

func WithHeartbeat

func WithHeartbeat(r chi.Router)

func WithRequestID

func WithRequestID(next http.Handler) http.Handler

Types

type LogEntry

type LogEntry struct {
	Logger *zap.SugaredLogger
}

func (*LogEntry) Panic

func (e *LogEntry) Panic(v interface{}, stack []byte)

func (*LogEntry) Write

func (e *LogEntry) Write(status, bytes int, _ http.Header, elapsed time.Duration, _ interface{})

type LogFormatter

type LogFormatter struct {
	Logger *zap.SugaredLogger
}

func (*LogFormatter) NewLogEntry

func (f *LogFormatter) NewLogEntry(r *http.Request) middleware.LogEntry

Jump to

Keyboard shortcuts

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