middleware

package
v0.29.5 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExcludePath added in v0.28.0

func ExcludePath(path string)

ExcludePath adds a single path to the exclusion list for request logging

func ExcludePaths added in v0.28.0

func ExcludePaths(paths ...string)

ExcludePaths adds paths to the exclusion list for request logging

func LogRequests added in v0.3.0

func LogRequests(next http.Handler) http.Handler

LogRequests logs the incoming requests

func PanicRecovery added in v0.3.0

func PanicRecovery(next http.Handler) http.Handler

func SetPathLogLevel added in v0.28.0

func SetPathLogLevel(path string, level slog.Level)

SetPathLogLevel sets the log level for a specific path other than the default info level

func TraceID added in v0.27.2

func TraceID(next http.Handler) http.Handler

Types

type Logger added in v0.6.0

type Logger struct {
	Logger *slog.Logger
}

func (Logger) ContextLogger added in v0.6.0

func (c Logger) ContextLogger(next http.Handler) http.Handler

Jump to

Keyboard shortcuts

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