log

package
v1.1.14 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2020 License: MIT Imports: 3 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Level

type Level int
const (
	LevelDebug Level = 1
	LevelInfo  Level = 2
	LevelWarn  Level = 3
	LevelError Level = 4
)

type Logger

type Logger interface {
	Debug(context.Context, ...interface{})
	Info(context.Context, ...interface{})
	Warn(context.Context, ...interface{})
	Error(context.Context, ...interface{})
}

func NewDefaultLogger

func NewDefaultLogger() Logger

type LoggerProxy

type LoggerProxy struct {
	LogLevel Level
	Logger   Logger
}

func NewLoggerProxy

func NewLoggerProxy(logLevel Level, logger Logger) *LoggerProxy

func (*LoggerProxy) Debug

func (p *LoggerProxy) Debug(ctx context.Context, args ...interface{})

func (*LoggerProxy) Error

func (p *LoggerProxy) Error(ctx context.Context, args ...interface{})

func (*LoggerProxy) Info

func (p *LoggerProxy) Info(ctx context.Context, args ...interface{})

func (*LoggerProxy) Warn

func (p *LoggerProxy) Warn(ctx context.Context, args ...interface{})

Jump to

Keyboard shortcuts

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