httplogger

package
v0.8.3 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2024 License: MIT Imports: 11 Imported by: 10

Documentation

Overview

Package httplogger implements a middleware that logs the incoming HTTP request & its duration using go-ethereum-log or logrus

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoggingMiddleware

func LoggingMiddleware(next http.Handler) http.Handler

LoggingMiddleware logs the incoming HTTP request & its duration.

func LoggingMiddlewareLogrus added in v0.4.5

func LoggingMiddlewareLogrus(logger *logrus.Entry, next http.Handler) http.Handler

LoggingMiddlewareLogrus logs the incoming HTTP request & its duration.

func LoggingMiddlewareSlog added in v0.8.0

func LoggingMiddlewareSlog(logger *slog.Logger, next http.Handler) http.Handler

LoggingMiddlewareSlog logs the incoming HTTP request & its duration.

func LoggingMiddlewareZap added in v0.4.8

func LoggingMiddlewareZap(logger *zap.Logger, next http.Handler) http.Handler

LoggingMiddlewareZap logs the incoming HTTP request & its duration.

Types

This section is empty.

Jump to

Keyboard shortcuts

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