feat: configure structured JSON logging with debug level
This commit is contained in:
@ -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{
|
||||
|
Reference in New Issue
Block a user