package
0.12.18
Repository: https://github.com/bugfixes/go-bugfixes.git
Documentation: pkg.go.dev

# Functions

BugFixes will create a new middleware handler from a http.Handler.
No description provided by the author
GetLogEntry returns the in-context LogEntry for a request.
GetReqID returns a request ID from the given context if one is present.
Logger is a middleware that logs the start and end of each request, along with some useful data about what was requested, what the response status was, and how long it took to return.
No description provided by the author
NewWrapResponseWriter wraps an http.ResponseWriter, returning a proxy that allows you to hook into various parts of the response process.
NextRequestID generates the next request ID in the sequence.
No description provided by the author
No description provided by the author
Recoverer is a middleware that recovers from panics, logs the panic (and a backtrace), and returns an HTTP 500 (Internal Server Error) status if possible.
RequestID is a middleware that injects a request ID into the context of each request.
RequestLogger returns a logger handler using a custom LogFormatter.
No description provided by the author
No description provided by the author
WithLogEntry sets the in-context LogEntry for a request.

# Constants

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
RequestIDKey is the key that holds the unique request ID in a request context.

# Variables

DefaultLogger is called by the Logger middleware handler to log each request.
No description provided by the author
LogEntryCtxKey is the context.Context key to store the request log entry.
RequestIDHeader is the name of the HTTP Header which contains the request id.

# Structs

No description provided by the author
DefaultLogFormatter is a simple logger that implements a LogFormatter.
No description provided by the author
No description provided by the author

# Interfaces

LogEntry records the final log when a request completes.
LogFormatter initiates the beginning of a new LogEntry per request.
LoggerInterface accepts printing to stdlib logger or compatible logger.
WrapResponseWriter is a proxy around an http.ResponseWriter that allows you to hook into various parts of the response process.

# Type aliases

No description provided by the author