add exception for unknown logging level

This commit is contained in:
2025-07-30 20:16:49 +03:00
parent f44e89b0de
commit cfa7724b68
2 changed files with 17 additions and 0 deletions

View File

@@ -16,6 +16,17 @@ import (
)
var GlobalLevel slog.Level
type levelsStruct struct {
Available []string
Fallback string
}
var Levels = levelsStruct{
Available: []string{
"debug", "info",
},
Fallback: "info",
}
type SlogWriter struct {
Logger *slog.Logger