level

package
v1.3.8 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2024 License: GPL-3.0 Imports: 0 Imported by: 0

Documentation

Overview

Package level provides an event-source agnostic log level system. Each source.Source is required to map its implementation-specific levels into a Level.

Index

Constants

This section is empty.

Variables

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

Levels in order of increasing significance.

Functions

This section is empty.

Types

type Level

type Level string

Level a log level.

const (
	// Trace log level.
	Trace Level = "TRACE"
	// Debug log level.
	Debug Level = "DEBUG"
	// Info log level.
	Info Level = "INFO"
	// Warn log level.
	Warn Level = "WARN"
	// Error log level.
	Error Level = "ERROR"
	// Default log level.
	Default = Info
)

func ByName

func ByName(s string) Level

ByName looks up the log level.

func (Level) IsAtLeast

func (level Level) IsAtLeast(l Level) bool

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

Jump to

Keyboard shortcuts

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