logging

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package logging provides slog.Handler decorators shared across the server.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler struct {
	slog.Handler
}

Handler wraps an slog.Handler and attaches the request's trace ID.

func NewHandler

func NewHandler(next slog.Handler) *Handler

NewHandler wraps next so every log record made via a *Context slog call automatically gets "traceId" attached.

func (*Handler) Handle

func (h *Handler) Handle(ctx context.Context, record slog.Record) error

func (*Handler) WithAttrs

func (h *Handler) WithAttrs(attrs []slog.Attr) slog.Handler

func (*Handler) WithGroup

func (h *Handler) WithGroup(name string) slog.Handler

Jump to

Keyboard shortcuts

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