log

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Logger

type Logger interface {
	Info(args ...interface{})
	Infof(format string, args ...interface{})
	InfoWithFields(msg string, fields map[string]interface{})
	Debug(args ...interface{})
	Debugf(format string, args ...interface{})
	Fatal(args ...interface{})
}

Logger is the interface that wraps the basic logging methods.

func NewLogrus

func NewLogrus(level string, output io.Writer) (Logger, error)

NewLogrus creates Logrus logger

type Logrus

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

Logrus is the implementation for a Logger using Logrus.

func (*Logrus) Debug

func (l *Logrus) Debug(args ...interface{})

Debug logging a new message with debug level.

func (*Logrus) Debugf

func (l *Logrus) Debugf(format string, args ...interface{})

Debugf logging a new message with debug level and custom format.

func (*Logrus) Fatal

func (l *Logrus) Fatal(args ...interface{})

Fatal logging a new message with fatal level.

func (*Logrus) Info

func (l *Logrus) Info(args ...interface{})

Info logging a new message with info level.

func (*Logrus) InfoWithFields

func (l *Logrus) InfoWithFields(msg string, fields map[string]interface{})

InfoWithFields logging a new message with info level and extra fields.

func (*Logrus) Infof

func (l *Logrus) Infof(format string, args ...interface{})

Infof logging a new message with info level and custom format.

Jump to

Keyboard shortcuts

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