logrust

package module
v0.0.0-...-223ad3b Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Default

func Default(opts ...Option) logt.Option

Default sets up Logrus collector for logrus.StandardLogger()

func Logrus

func Logrus(logger *logrus.Logger, opts ...Option) logt.Option

Logrus sets up collector for provided Logrus logger.

func New

func New(logger *logrus.Logger, opts ...Option) logcollect.Collector

Types

type Collector

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

func (*Collector) CaptureLogs

func (c *Collector) CaptureLogs(sink logcollect.Sink) func()

func (*Collector) Close

func (c *Collector) Close()

func (*Collector) Fire

func (c *Collector) Fire(entry *logrus.Entry) error

func (*Collector) Levels

func (c *Collector) Levels() []logrus.Level

type Option

type Option func(o *options)

func WithLevels

func WithLevels(levels []logrus.Level) Option

WithLevels specifies at which logrus log levels should be captured. If not set, all levels will be used.

Jump to

Keyboard shortcuts

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