logging

package
v0.0.49 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitLogging

func InitLogging(
	verbose bool,
	stdWriter io.Writer,
	errWriter io.Writer,
)

Log is the main application logger. InitLogging for logrus.

Types

type Formatter

type Formatter struct{}

Formatter formats a log entry in a human readable way.

func (*Formatter) Format

func (f *Formatter) Format(entry *log.Entry) ([]byte, error)

Format implements the log.Formatter interface.

type LogRepresenter

type LogRepresenter interface {
	Repr() string
}

LogRepresenter is an interface for objects that can format themselves for logging.

type WriterHook added in v0.0.30

type WriterHook struct {
	Writer    io.Writer
	LogLevels []log.Level
}

WriterHook struct for routing std depending on lvl.

func (*WriterHook) Fire added in v0.0.30

func (hook *WriterHook) Fire(entry *log.Entry) error

Fire method prosees entry for Writer.

func (*WriterHook) Levels added in v0.0.30

func (hook *WriterHook) Levels() []log.Level

Levels geter for list of lvls.

Jump to

Keyboard shortcuts

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