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" "html/template"
"log/slog" "log/slog"
"net/http" "net/http"
"os"
) )
func init() { func init() {
// init slog to be at level debug and us json structured logs; ai! handler := slog.NewJSONHandler(os.Stderr, &slog.HandlerOptions{
slog = slog.New() Level: slog.LevelDebug,
})
slog = slog.New(handler)
} }
var roundWords = map[string]string{ var roundWords = map[string]string{