level

package
v1.0.9 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2021 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Default = Info

Default ...

View Source
var Levels = []Level{
	Trace,
	Debug,
	Info,
	Warn,
	Error,
}

Levels ...

Functions

func LowerNames

func LowerNames() []string

LowerNames ...

Types

type Level

type Level string

Level a log level.

const (
	// Trace log level for tracing
	Trace Level = "TRACE"
	// Debug log level for debugging
	Debug Level = "DEBUG"
	// Info log level for information
	Info Level = "INFO"
	// Warn log level for warnings
	Warn Level = "WARN"
	// Error log level for errors
	Error Level = "ERROR"
)

func ByName

func ByName(s string, defaultLevel Level) Level

ByName ...

func (Level) IsAtLeast

func (level Level) IsAtLeast(l Level) bool

IsAtLeast determines if the specified level is at least as high as this level.

func (Level) LowerName

func (level Level) LowerName() string

LowerName returns a name that is more simple for the user to enter.

Jump to

Keyboard shortcuts

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