logging

package
v0.0.53 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitLogging

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

Log is the main application logger. InitLogging for logrus.

Types

type ExecLogger added in v0.0.50

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

ExecLogger is used in Executor. If adds command chain in message like this: lets: [foo=>bar] message.

func NewExecLogger added in v0.0.50

func NewExecLogger() *ExecLogger

func (*ExecLogger) Child added in v0.0.50

func (l *ExecLogger) Child(name string) *ExecLogger

func (*ExecLogger) Debug added in v0.0.50

func (l *ExecLogger) Debug(format string, a ...interface{})

func (*ExecLogger) Info added in v0.0.50

func (l *ExecLogger) Info(format string, a ...interface{})

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