logger

package
v0.0.0-...-c1fd308 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2020 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewContext

func NewContext(ctx context.Context, l *Logger) context.Context

Types

type Logger

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

func FromContext

func FromContext(ctx context.Context) (*Logger, bool)

func FromContextOrNew

func FromContextOrNew(ctx context.Context) *Logger

FromContextOrNew return logger from context or create a new one

func NewLogger

func NewLogger(opts ...Option) *Logger

func (*Logger) Ext1FieldLogger

func (l *Logger) Ext1FieldLogger() logrus.Ext1FieldLogger

func (*Logger) FieldLogger

func (l *Logger) FieldLogger() logrus.FieldLogger

func (*Logger) Logger

func (l *Logger) Logger() *logrus.Logger

func (*Logger) StdLogger

func (l *Logger) StdLogger() logrus.StdLogger

type Option

type Option func(*Logger)

func WithCustomFormatter

func WithCustomFormatter(formatter logrus.Formatter) Option

func WithJsonFormatter

func WithJsonFormatter(prettyPrint bool) Option

func WithLevel

func WithLevel(level string) Option

Jump to

Keyboard shortcuts

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