ginMiddleware

package
v1.36.0 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2026 License: GPL-3.0 Imports: 5 Imported by: 2

README

ginMiddleware

import "github.com/greenbone/opensight-golang-libraries/pkg/logs/ginMiddleware"

Index

func Logging

func Logging() gin.HandlerFunc

Logging returns a Gin ginMiddleware handler that injects structured logging using zerolog into the request lifecycle. It ensures each request is assigned a correlation ID, which is included in both the request context and the response headers.

This is useful for tracing and debugging distributed systems, where tracking requests across services is critical.

Generated by gomarkdoc

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Logging

func Logging() gin.HandlerFunc

Logging returns a Gin ginMiddleware handler that injects structured logging using zerolog into the request lifecycle. It ensures each request is assigned a correlation ID, which is included in both the request context and the response headers.

This is useful for tracing and debugging distributed systems, where tracking requests across services is critical.

Types

This section is empty.

Jump to

Keyboard shortcuts

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