...

Package severity

import "k8s.io/klog/v2/internal/severity"
Overview
Index

Overview ▾

Package severity provides definitions for klog severity (info, warning, ...)

Constants

Char contains one shortcut letter per severity level.

const Char = "IWEF"

Variables

Name contains one name per severity level.

var Name = []string{
    InfoLog:    "INFO",
    WarningLog: "WARNING",
    ErrorLog:   "ERROR",
    FatalLog:   "FATAL",
}

type Severity

severity identifies the sort of log: info, warning etc. The binding to flag.Value is handled in klog.go

type Severity int32 // sync/atomic int32

These constants identify the log levels in order of increasing severity. A message written to a high-severity log file is also written to each lower-severity log file.

const (
    InfoLog Severity = iota
    WarningLog
    ErrorLog
    FatalLog
    NumSeverity = 4
)

func ByName

func ByName(s string) (Severity, bool)

ByName looks up a severity level by name.