log

package
v7.6.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2019 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NoContext

func NoContext() *logrus.Logger

NoContext provides logrus.StandardLogger()

func WithContext

func WithContext(ctx context.Context) *logrus.Entry

WithContext provides a *logrus.Entry with the proper "correlation_id" field.

"[MISSING]" will be used when ctx has no value for KeyCorrelationID

func WithError

func WithError(ctx context.Context, err error) *logrus.Entry

WithError decorates logrus.WithError with the proper "correlation_id"

func WithField

func WithField(ctx context.Context, key string, value interface{}) *logrus.Entry

WithField decorates logrus.WithField with the proper "correlation_id"

func WithFields

func WithFields(ctx context.Context, f Fields) *logrus.Entry

WithFields decorates logrus.WithFields with the proper "correlation_id"

func WrapEntry

func WrapEntry(ctx context.Context, e *logrus.Entry) *logrus.Entry

WrapEntry adds the proper "correlation_id" field to the provided *logrus.Entry

Types

type Fields

type Fields map[string]interface{}

Fields type, an helper to avoid importing logrus.Fields

Jump to

Keyboard shortcuts

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