Standard library / log/slog

slog.LevelWarn

Conventional warn severity level. Expected stdout: '4\n'.

Formal Syntax & Structure

go syntaxgo
const LevelWarn Level = 4

Working Example

Example Snippetgo
package main
import (  "fmt"  "log/slog")
func main() { fmt.Println(int(slog.LevelWarn)) }
Go Reference