logging

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 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 Fields

type Fields map[string]interface{}

type Formatter

type Formatter interface {
	// contains filtered or unexported methods
}

func ParseFormat

func ParseFormat(format string) (Formatter, error)

type JsonFormatter

type JsonFormatter struct{}

type Level

type Level uint32
const (
	PanicLevel Level = iota
	FatalLevel
	ErrorLevel
	WarnLevel
	InfoLevel
	DebugLevel
	TraceLevel
)

func ParseLevel

func ParseLevel(lvl string) (Level, error)

func (Level) String

func (lvl Level) String() string

type Logger

type Logger interface {
	WithError(error) Logger
	WithFields(Fields) Logger
	WithField(string, interface{}) Logger
	Infof(string, ...interface{})
	Info(...interface{})
	Warnf(string, ...interface{})
	Warn(...interface{})
	Error(...interface{})
	Debugf(string, ...interface{})
	Debug(...interface{})
	GetLevel() Level
	SetLevel(Level)
	SetFormatter(Formatter)
	Exit(int)
}

type TextFormatter

type TextFormatter struct{}

Jump to

Keyboard shortcuts

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