severity

package
v0.35.5 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2022 License: MIT Imports: 2 Imported by: 1

Documentation

Overview

severity provides syslog-type severity level handling.

Index

Constants

View Source
const (
	SeverityDisabled      = "disabled"
	SeverityEmergency     = "emerg"
	SeverityAlert         = "alert"
	SeverityCritical      = "crit"
	SeverityError         = "err"
	SeverityWarning       = "warning"
	SeverityNotice        = "notice"
	SeverityInformational = "info"
	SeverityDebug         = "debug"
)

Variables

This section is empty.

Functions

func Parse

func Parse(sev string) (string, error)

Parse takes a string and returns a constant `Severity` value. Common aliases such as `warn` and `info` are included.

func Severities

func Severities() []string

Severities returns a list of severities.

func SeverityInclude

func SeverityInclude(filterLevel, itemLevel string) (bool, error)

SeverityInclude checks to see if a severity level is included against a certain severity filter.

Types

This section is empty.

Jump to

Keyboard shortcuts

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