level

package
v1.0.7 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2025 License: BSD-3-Clause Imports: 5 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrUnknownLevel = errors.New("unknown log level")

Functions

func ToZapLevel

func ToZapLevel(level Level) zapcore.Level

ToZapLevel converts our Level to zapcore.Level

Types

type Level

type Level int8

Level represents a logging level

const (
	Verbo Level = iota - 9
	Debug
	Trace
	Info
	Warn
	Error
	Fatal
	Off
)

func FromZapLevel

func FromZapLevel(level zapcore.Level) Level

FromZapLevel converts zapcore.Level to our Level

func ToLevel

func ToLevel(l string) (Level, error)

ToLevel converts a string to a Level

func (Level) LowerString

func (l Level) LowerString() string

LowerString returns the lowercase string representation of a Level

func (Level) MarshalJSON

func (l Level) MarshalJSON() ([]byte, error)

MarshalJSON marshals the Level to JSON

func (Level) String

func (l Level) String() string

String returns the string representation of a Level

func (*Level) UnmarshalJSON

func (l *Level) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the Level from JSON

Jump to

Keyboard shortcuts

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