sink

package
Version: v0.0.0-...-ab5e019 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewJson

func NewJson(writer io.Writer) structlog.Sink

func NewLogrus

func NewLogrus(log Logrus) structlog.Sink

func NewNoop

func NewNoop() structlog.Logger

Types

type Json

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

func (Json) Log

func (s Json) Log(event structlog.Event)

type Logrus

type Logrus interface {
	WithFields(fields logrus.Fields) *logrus.Entry
	WithError(err error) *logrus.Entry
	WithTime(t time.Time) *logrus.Entry

	Trace(args ...interface{})
	Debug(args ...interface{})
	Info(args ...interface{})
	Warn(args ...interface{})
	Error(args ...interface{})
	Fatal(args ...interface{})
	Panic(args ...interface{})
}

type LogrusSink

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

func (LogrusSink) Log

func (s LogrusSink) Log(event structlog.Event)

type Noop

type Noop struct{}

func (Noop) Log

func (s Noop) Log(event structlog.Event)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL