logger

package
v1.1.31 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromContext

func FromContext(ctx context.Context, noopLogger bool) *logrus.Entry

FromContext returns the logger set with WithLogger or nil

func New

func New(level string, fields ...logrus.Fields) *logrus.Entry

New creates a new loggger

func WithLogger

func WithLogger(ctx context.Context, entry *logrus.Entry) context.Context

WithLogger adds the logger as context value

Types

type Logger added in v0.1.11

type Logger interface {
	Logger() *logrus.Entry
	SetLogger(logger *logrus.Entry)
}

Jump to

Keyboard shortcuts

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