log

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2021 License: MIT Imports: 10 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.

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