logger

package
v0.0.0-...-a470c86 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	InfoLevel  string = "info"
	WarnLevel  string = "warn"
	DebugLevel string = "debug"
	ErrorLevel string = "error"
	FatalLevel string = "fatal"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Callback

type Callback struct{}

callback

func (Callback) Fail

func (callback Callback) Fail(result *producer.Result)

func (Callback) Success

func (callback Callback) Success(result *producer.Result)

type Provider

type Provider interface {
	// log at different level. Depending on the performance, might need to use the batch
	// list later.
	Infow(msg string, keysAndValues ...string)
	Warnw(msg string, keysAndValues ...string)
	Debugw(msg string, keysAndValues ...string)
	Errorw(msg string, keysAndValues ...string)
	// Fatal logs a fatal error and exit with status 1.
	Fatal(msg string, err error)
	// Close the logger safely.
	Close()
}

func NewAliyunProvider

func NewAliyunProvider(cfg config.LoggerConfig) Provider

func NewMockProvider

func NewMockProvider() Provider

func NewProvider

func NewProvider(cfg config.LoggerConfig) Provider

Jump to

Keyboard shortcuts

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