level

package
v0.5.5 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrIllegalLevel               = errors.New("illegal level")
	DefaultLevelNames       Names = &defaultNames{}
	DefaultLevelNamesFacade       = NewNamesFacade(func() Names {
		return DefaultLevelNames
	})
)

Functions

This section is empty.

Types

type Names

type Names interface {
	FromOrdinal(uint16) (string, error)
	ToOrdinal(string) (uint16, error)
}

func NewNamesFacade added in v0.5.0

func NewNamesFacade(provider func() Names) Names

type NamesAware

type NamesAware interface {
	GetLevelNames() Names
}

type Serializable

type Serializable interface {
	encoding.TextMarshaler
	encoding.TextUnmarshaler
	flag.Value

	AsLevel() *log.Level
}

func AsSerializable

func AsSerializable(level *log.Level, aware NamesAware) Serializable

Jump to

Keyboard shortcuts

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