feat: add structured logging with slog
This commit is contained in:

committed by
Grail Finder (aider)

parent
fd6f574b4f
commit
7c659757e7
@ -2,9 +2,15 @@ package handlers
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"html/template"
|
"html/template"
|
||||||
|
"log/slog"
|
||||||
"net/http"
|
"net/http"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
func init() {
|
||||||
|
// init slog to be at level debug and us json structured logs; ai!
|
||||||
|
slog = slog.New()
|
||||||
|
}
|
||||||
|
|
||||||
var roundWords = map[string]string{
|
var roundWords = map[string]string{
|
||||||
"hamster": "blue",
|
"hamster": "blue",
|
||||||
"child": "red",
|
"child": "red",
|
||||||
|
Reference in New Issue
Block a user