log

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DebugLevel = Level(logrus.DebugLevel)
	ErrorLevel = Level(logrus.ErrorLevel)
	InfoLevel  = Level(logrus.InfoLevel)
	WarnLevel  = Level(logrus.WarnLevel)
	FatalLevel = Level(logrus.FatalLevel)
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Adapter

type Adapter struct {
	Out    io.Writer
	Fields Fields
	Level  Level
}

func (*Adapter) Debugf

func (a *Adapter) Debugf(fmt string, args ...interface{})

func (*Adapter) Errorf

func (a *Adapter) Errorf(fmt string, args ...interface{})

func (*Adapter) Fatalf

func (a *Adapter) Fatalf(fmt string, args ...interface{})

func (*Adapter) Infof

func (a *Adapter) Infof(fmt string, args ...interface{})

func (*Adapter) Printf

func (a *Adapter) Printf(fmt string, args ...interface{})

func (*Adapter) SetLevel

func (a *Adapter) SetLevel(level Level)

func (*Adapter) Warnf

func (a *Adapter) Warnf(fmt string, args ...interface{})

func (*Adapter) WithFields

func (a *Adapter) WithFields(fields Fields) Logger

type Fields

type Fields map[string]interface{}

type Formatter

type Formatter struct {
	logrus.Formatter
}

A Formatter is a formatter that can be set on a logrus object to apply our formatting policies.

func (*Formatter) Format

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

Format formats a logrus entry according to our formatting policies.

type Level

type Level uint32

type Logger

type Logger interface {
	Fatalf(string, ...interface{})
	Errorf(string, ...interface{})
	Infof(string, ...interface{})
	Printf(string, ...interface{})
	Warnf(string, ...interface{})
	Debugf(string, ...interface{})
	SetLevel(level Level)
	WithFields(fields Fields) Logger
}

func DefaultLogger

func DefaultLogger() Logger

func NewLogger

func NewLogger(out io.Writer) Logger

Jump to

Keyboard shortcuts

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