logutil

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2016 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Entry

type Entry struct {
	*log.Entry
}

Entry wraps the normal log entry type to add support for custom With functions

func NewEntry

func NewEntry(entry *log.Entry) *Entry

NewEntry wraps a *logrus.Entry in the custom Entry type.

func (*Entry) WithError

func (entry *Entry) WithError(err error) *Entry

WithError adds an error as single field (using the key defined in ErrorKey) to the Entry.

func (*Entry) WithErrors

func (entry *Entry) WithErrors(err error) *Entry

WithErrors unwraps and expands an errwrap error to show nested errors

func (*Entry) WithField

func (entry *Entry) WithField(key string, value interface{}) *Entry

WithField adds a single field to the Entry.

func (*Entry) WithFields

func (entry *Entry) WithFields(fields log.Fields) *Entry

WithFields adds a map of fields to the Entry.

Jump to

Keyboard shortcuts

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