logger

package
v2.0.0-beta4+incompatible Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2019 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Overview

Package logger contains logging utilities.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Get

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

Get returns logrus entry for given context. Set must be called before this method is called.

func MakeRequestID

func MakeRequestID() string

MakeRequestID returns a new request ID.

func Set

func Set(ctx context.Context, requestID string) context.Context

Set returns derived context with set logrus entry with given request ID.

func SetEntry

func SetEntry(ctx context.Context, l *logrus.Entry) context.Context

SetEntry returns derived context with set given logrus entry.

Types

type GRPC

type GRPC struct {
	*logrus.Entry
}

GRPC is a compatibility wrapper between logrus entry and gRPC logger interface.

func (*GRPC) V

func (v *GRPC) V(l int) bool

V reports whether verbosity level l is at least the requested verbose level.

Jump to

Keyboard shortcuts

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