Standard library / log/slog
slog.Leveler
Interface supplying a severity Level. Expected stdout: 'WARN\n'.
Formal Syntax & Structure
go syntaxgo
type Leveler interface { Level() Level}Working Example
Example Snippetgo
package main
import ( "fmt" "log/slog")
func main() { var l slog.Leveler = slog.LevelWarn; fmt.Println(l.Level()) }