~bigbes/sr-ht-ecore

ref: 34cf83d43d19071055e7e7593d0646519771e625 sr-ht-ecore/middleware/middleware_test.go -rw-r--r-- 8.7 KiB
f019dbe4 — Eugene Blikh 10 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 10 days ago
middleware: the shared cache and panic handling