log

package
v0.36.0 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2026 License: MIT Imports: 3 Imported by: 2 modules, 2 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package log provides helpers to attach a github.com/foomo/keel/log.Labeler to an HTTP request context, so code handling the request can collect additional log fields for it.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InjectLabelerIntoContext

func InjectLabelerIntoContext(ctx context.Context) (context.Context, *log.Labeler)

InjectLabelerIntoContext returns a copy of ctx carrying a fresh, empty log.Labeler, together with that labeler.

func InjectLabelerIntoRequest

func InjectLabelerIntoRequest(r *http.Request) (*http.Request, *log.Labeler)

InjectLabelerIntoRequest returns a shallow copy of r whose context carries a fresh, empty log.Labeler, together with that labeler.

func LabelerFromContext

func LabelerFromContext(ctx context.Context) (*log.Labeler, bool)

LabelerFromContext returns the log.Labeler injected into ctx by InjectLabelerIntoContext. It reports false if none is present.

func LabelerFromRequest

func LabelerFromRequest(r *http.Request) (*log.Labeler, bool)

LabelerFromRequest returns the log.Labeler injected into the context of r. It reports false if none is present.

Types

This section is empty.

Jump to

Keyboard shortcuts

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