reqlog

package
v0.0.0-...-081568e Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package reqlog provides utilities for working with request context.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Logger

func Logger(ctx context.Context) *zerolog.Logger

Logger returns the logger from the given context. If the logger was not found in the context, it returns a disabled logger.

func RequestLogger

func RequestLogger(c *gin.Context) *zerolog.Logger

RequestLogger returns the logger from the given context. If the logger was not found in the context, it returns a disabled logger.

func SetLogger

func SetLogger(c *gin.Context, logger zerolog.Logger)

SetLogger sets the logger in the given context.

func UpdateLogger

func UpdateLogger(c *gin.Context, update func(current *zerolog.Logger) zerolog.Logger)

UpdateLogger updates the logger in the given context. The update function is called with the current logger.

Types

This section is empty.

Jump to

Keyboard shortcuts

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