Standard library / log/slog
slog.Level.String()
Return the symbolic severity name with an offset for nonstandard levels. Expected stdout: 'INFO\n'.
Formal Syntax & Structure
go syntaxgo
func (l Level) String() stringReturn Value
string
Return the symbolic severity name with an offset for nonstandard levels.
Working Example
Example Snippetgo
package main
import ( "fmt" "log/slog")
func main() { fmt.Println(slog.LevelInfo.String()) }