logging

package
v1.12.0 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2026 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoggerMiddleware

func LoggerMiddleware() gin.HandlerFunc

LoggerMiddleware creates a middleware for logging HTTP requests and responses, including latency and client details. It assigns a unique identifier (GUID) to each request and logs authentication methods, TLS info, and status codes.

func LoggerMiddlewareWithLogger added in v1.12.0

func LoggerMiddlewareWithLogger(logger *slog.Logger) gin.HandlerFunc

LoggerMiddlewareWithLogger is a deps-based variant of LoggerMiddleware.

HTTP stack should not rely on `log.Logger` globals. Call sites that are already DI-based should pass an injected `*slog.Logger`.

Types

This section is empty.

Jump to

Keyboard shortcuts

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