log

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package log provides logging instrumentation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HTTPTraceTransaction

func HTTPTraceTransaction(fields ctxd.FieldNames) func(h http.Handler) http.Handler

HTTPTraceTransaction adds trace transaction info to request context.

func SpanIDFieldToContexts

func SpanIDFieldToContexts(fieldName string, tracer trace.Tracer) trace.Tracer

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.

Jump to

Keyboard shortcuts

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