~bigbes/sr-ht-ecore

ref: b6bf6d28db15fc8a3c37fe1a6ae7bcb55d06e569 sr-ht-ecore/middleware/middleware_test.go -rw-r--r-- 8.7 KiB
f019dbe4 — Eugene Blikh 9 days ago
middleware: report panics through slog

The two log.Printf lines were the last stdlib log in ecore, and they printed
a formatted sentence where every service on the instance now emits structured
records — a panic report that cannot be filtered by path or grouped by route
is the one log line an operator most wants to query.

Through slog's default logger rather than one handed to RecoverPanics: a
library has no business choosing a handler. The service installs scribe's at
startup with SetDefault, and these land in the same stream, with the same
masking, as its own lines.
77b1a8d2 — Eugene Blikh 9 days ago
middleware: the shared cache and panic handling