logger

package
v2.9.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2020 License: AGPL-3.0 Imports: 4 Imported by: 9

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) Info

func (v *GRPC) Info(args ...interface{})

override InfoXXX methods with TraceXXX to keep gRPC and logrus levels in sync

func (*GRPC) Infof

func (v *GRPC) Infof(format string, args ...interface{})

func (*GRPC) Infoln

func (v *GRPC) Infoln(args ...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