errorhandler

package
v0.0.0-...-4a4870b Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ErrorHandler

func ErrorHandler(logger log.Logger) emperror.Handler

ErrorHandler returns an error handler.

func ToMap

func ToMap(keyvals []interface{}) map[string]interface{}

ToMap creates a map of key-value pairs.

The implementation bellow is from go-kit's JSON logger.

Types

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

func NewHandler

func NewHandler(logger log.Logger) *Handler

NewHandler returns a handler which logs errors using the platform logger

func (*Handler) Handle

func (h *Handler) Handle(err error)

Handle logs an error

Jump to

Keyboard shortcuts

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