log

package
v1.20.4 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package log provides a global interface to logging functionality

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddRequestNameAndID added in v1.19.0

func AddRequestNameAndID(ctx context.Context, name string) context.Context

func Debugf

func Debugf(ctx context.Context, format string, args ...interface{})

func Errorf

func Errorf(ctx context.Context, format string, args ...interface{})

func Infof

func Infof(ctx context.Context, format string, args ...interface{})

func RemoveHook

func RemoveHook(logger *logrus.Logger, name string)

func StreamInterceptor

func StreamInterceptor() grpc.StreamServerInterceptor

func UnaryInterceptor

func UnaryInterceptor() grpc.UnaryServerInterceptor

func Warnf

func Warnf(ctx context.Context, format string, args ...interface{})

Types

type FileNameHook

type FileNameHook struct {
	Formatter func(file, function string, line int) string
	// contains filtered or unexported fields
}

func NewFilenameHook

func NewFilenameHook() *FileNameHook

NewFilenameHook creates a new default FileNameHook

func (*FileNameHook) Fire

func (f *FileNameHook) Fire(entry *logrus.Entry) error

Fire executes the hook for every logrus entry

func (*FileNameHook) Levels

func (f *FileNameHook) Levels() []logrus.Level

Levels returns the levels for which the hook is activated. This contains currently only the DebugLevel

type FilterHook

type FilterHook struct {
	// contains filtered or unexported fields
}

func NewFilterHook

func NewFilterHook(filter string) (*FilterHook, error)

NewFilterHook creates a new default FilterHook

func (*FilterHook) Fire

func (f *FilterHook) Fire(entry *logrus.Entry) error

Fire executes the hook for every logrus entry

func (*FilterHook) Levels

func (f *FilterHook) Levels() []logrus.Level

Levels returns the levels for which the hook is activated. This contains currently only the DebugLevel

type ID

type ID struct{}

type Name

type Name struct{}

type ServerStream

type ServerStream struct {
	grpc.ServerStream
	NewContext context.Context
}

func NewServerStream

func NewServerStream(stream grpc.ServerStream) *ServerStream

func (*ServerStream) Context

func (w *ServerStream) Context() context.Context

Jump to

Keyboard shortcuts

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