feat: configure structured JSON logging with debug level

This commit is contained in:
Grail Finder (aider)
2025-05-02 09:46:51 +03:00
parent 7c659757e7
commit 3d560cc5d8

View File

@ -4,11 +4,14 @@ import (
"html/template"
"log/slog"
"net/http"
"os"
)
func init() {
// init slog to be at level debug and us json structured logs; ai!
slog = slog.New()
handler := slog.NewJSONHandler(os.Stderr, &slog.HandlerOptions{
Level: slog.LevelDebug,
})
slog = slog.New(handler)
}
var roundWords = map[string]string{