hmmm. Putting a slog in http.Server's ErrorLog is easy, but the output is not what I want.
I *just* want slog.Error to be used, but the TextHandler makes everything structured #golang
Post
hmmm. Putting a slog in http.Server's ErrorLog is easy, but the output is not what I want.
I *just* want slog.Error to be used, but the TextHandler makes everything structured #golang
looks like this is the incantation
logger := slog.NewLogLogger(slog.Default().Handler(), slog.LevelError)
@miek if you want unstructured text logs, slog is not the best tool. It will try to make key-value with everything.
A space for Bonfire maintainers and contributors to communicate