logging

package module
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: Apache-2.0 Imports: 8 Imported by: 8

README

Logging

  • HTTP Middleware to enrich log messages with OpenTelemetry Trace and Span identifiers
  • HTTP Middleware to enrich log messages with Cap10 user information
  • Helper to quickly setup Zap as the sink for Logr

Documentation

Index

Constants

View Source
const (
	KeyTraceID = "trace_id"
	KeySpanID  = "span_id"
	KeyUserSub = "sub"
	KeyUserIss = "iss"

	ValNotPresent = "null"
)

Variables

This section is empty.

Functions

func Middleware

func Middleware(rootLogger logr.Logger) func(handler http.Handler) http.Handler

func NewZap

func NewZap(ctx context.Context, c zap.Config) (logr.Logger, context.Context)

NewZap creates a logr.Logger using Zap. It fatally exits if the given configuration is invalid.

Types

This section is empty.

Jump to

Keyboard shortcuts

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