record

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetLevels

func GetLevels() map[Level]string

GetLevels returns levels map

Types

type Level added in v0.2.0

type Level int
const (
	// DEBUG Detailed debug information
	DEBUG Level = 100
	// INFO Interesting events
	INFO Level = 200
	// NOTICE Uncommon events
	NOTICE Level = 250
	// WARNING Exceptional occurrences that are not errors
	WARNING Level = 300
	// ERROR Runtime errors
	ERROR Level = 400
	// CRITICAL Critical conditions
	CRITICAL Level = 500
	// ALERT Action must be taken immediately
	ALERT Level = 550
	// EMERGENCY Urgent alert.
	EMERGENCY Level = 600
)

func GetLevel added in v1.4.0

func GetLevel(levelKey string) Level

GetLevel Parse the string level into a Level constant.

type Record

type Record struct {
	Level     Level
	Message   string
	LevelName string
	Channel   string
	Datetime  time.Time
	Formatted string
}

Jump to

Keyboard shortcuts

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