Documentation ¶
Index ¶
Constants ¶
View Source
const Message = "request completed"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SlogLogger ¶
type SlogLogger struct {
// contains filtered or unexported fields
}
SlogLogger is an idiomatic middleware to log requests using slog logger.
func NewSlogLogger ¶
func NewSlogLogger(next http.Handler, log *slog.Logger) *SlogLogger
func (*SlogLogger) ServeHTTP ¶
func (l *SlogLogger) ServeHTTP(res http.ResponseWriter, req *http.Request)
ServeHTTP implements http.Handler interface.
Click to show internal directories.
Click to hide internal directories.