...

Package logrushandler

import "github.com/goph/emperror/handler/logrushandler"
Overview
Index
Examples

Overview ▾

Package logrushandler provides Logrus integration.

type Handler

Handler logs errors using Logrus.

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

func New

func New(logger logrus.FieldLogger) *Handler

New creates a new handler.

Example

Code:

logger := logrus.New()
_ = logrushandler.New(logger)

func (*Handler) Handle

func (h *Handler) Handle(err error)

Handle logs an error.