Documentation ¶
Overview ¶
Package log provides logging instrumentation.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HTTPTraceTransaction ¶
HTTPTraceTransaction adds trace transaction info to request context.
func SpanIDFieldToContexts ¶
SpanIDFieldToContexts instruments trace.Tracer to add SpanID to context fields.
func UsecaseErrors ¶ added in v0.0.9
func UsecaseErrors(logger ctxd.Logger) usecase.Middleware
UsecaseErrors logs use case errors.
Types ¶
type HTTPRecover ¶
type HTTPRecover struct { Logger ctxd.Logger FieldNames ctxd.FieldNames PrintPanic bool ExposePanic bool OnPanic []func(ctx context.Context, rcv interface{}, stack []byte) }
HTTPRecover logs http request and response details and recovers from panics.
func (HTTPRecover) Middleware ¶
func (mw HTTPRecover) Middleware() func(handler http.Handler) http.Handler
Middleware wraps http handler.
Click to show internal directories.
Click to hide internal directories.