werrors

package
v0.0.0-...-ec3c1f2 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2016 License: Apache-2.0 Imports: 4 Imported by: 1

Documentation

Index

Constants

View Source
const ErrFailedGetCaller = "Failed to get caller"

ErrFailedGetCaller - error get caller

Variables

This section is empty.

Functions

func AddFields

func AddFields(err error, fields ...zap.Field) error

AddFields - add new fields for error

func LogError

func LogError(logger zap.Logger, err error)

LogError - write error to zap log

func New

func New(msg string) error

New - create error with caller only

func NewDetails

func NewDetails(msg string, details error) error

NewDetails - create error with caller and details message

func NewEx

func NewEx(logLevel zap.Level, msg string, fields ...zap.Field) error

NewEx - create error with all fields

func NewFields

func NewFields(msg string, fields ...zap.Field) error

NewFields - create error with custom fields

func NewLevel

func NewLevel(logLevel zap.Level, msg string) error

NewLevel - create error with caller and log level

Types

type ErrorEx

type ErrorEx struct {
	Level  zap.Level
	Fields []zap.Field
	// contains filtered or unexported fields
}

ErrorEx - error with extended fields

func (ErrorEx) Error

func (e ErrorEx) Error() string

type LogLevel

type LogLevel int32

LogLevel level for logging

Jump to

Keyboard shortcuts

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