Files
obsx/log.go
T
M.ShakhmatovandClaude Fable 5.2 8837e8d316
CI / test (push) Successful in 1m12s
Deprecate v1.0.0 HTTP and log helpers in favour of the toolkit API
LogHandler and HTTPTransport now delegate to NewTraceHandler and
NewHTTPTransport. HTTPMiddleware keeps its v1.0.0 metric names but
shares responseWriter and normalizeMethod with NewHTTPMiddleware.
The package example shows obsx.New.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-15 16:43:33 +03:00

11 lines
349 B
Go

package obsx
import "log/slog"
// LogHandler wraps h so that records logged with a context carrying a span
// (slog.InfoContext and friends) get trace_id and span_id attributes,
// linking logs to traces.
//
// Deprecated: use NewTraceHandler, which LogHandler now calls.
func LogHandler(h slog.Handler) slog.Handler { return NewTraceHandler(h) }