logs

package
v0.0.0-...-eb69673 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMicroLogrus

func NewMicroLogrus(rootLogger *logrus.Logger) logger.Logger

func NewWriter

func NewWriter(scope *LogrusScope) io.Writer

Types

type LogrusScope

type LogrusScope struct {
	*logrus.Entry
}

func (*LogrusScope) Call

func (ls *LogrusScope) Call(h interface{}, args ...interface{}) (result *LogrusScopeResult)

func (*LogrusScope) Handle

func (LogrusScope) WithField

func (ls LogrusScope) WithField(key string, value interface{}) *LogrusScope

func (LogrusScope) WithFields

func (ls LogrusScope) WithFields(fields logrus.Fields) *LogrusScope

type LogrusScopeCallHandler

type LogrusScopeCallHandler func(ls *LogrusScope) (result interface{}, err error)

type LogrusScopeErrorHandler

type LogrusScopeErrorHandler func(err error, ls *LogrusScope) error

type LogrusScopeResult

type LogrusScopeResult struct {
	*logrus.Entry
	// contains filtered or unexported fields
}

func (*LogrusScopeResult) Catch

func (*LogrusScopeResult) GetError

func (r *LogrusScopeResult) GetError() error

func (*LogrusScopeResult) GetResult

func (r *LogrusScopeResult) GetResult() interface{}

func (*LogrusScopeResult) HasError

func (r *LogrusScopeResult) HasError() bool

func (*LogrusScopeResult) OnError

func (*LogrusScopeResult) Then

func (r *LogrusScopeResult) Then(h interface{}, args ...interface{}) (result *LogrusScopeResult)

func (*LogrusScopeResult) ThenHandle

func (LogrusScopeResult) WithField

func (r LogrusScopeResult) WithField(key string, value interface{}) *LogrusScopeResult

func (LogrusScopeResult) WithFields

func (r LogrusScopeResult) WithFields(fields logrus.Fields) *LogrusScopeResult

type LogrusScopeThenHandler

type LogrusScopeThenHandler func(last interface{}, ls *LogrusScope) (result interface{}, err error)

Jump to

Keyboard shortcuts

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