From 83c230734e528edfcb9b229cd0380f97a6b07196 Mon Sep 17 00:00:00 2001 From: Chris Duncan Date: Thu, 16 Nov 2023 03:53:37 -0700 Subject: [PATCH] Created a middleware and library that allows two context based workflows: storing attributes in the context, to be added to log lines by a handler; and adding the logger itself to context, with helper methods for interacting with it directly in the context. https://github.com/veqryn/slog-context --- Resources-for-slog.md | 1 + 1 file changed, 1 insertion(+) diff --git a/Resources-for-slog.md b/Resources-for-slog.md index 923aead7..04548a98 100644 --- a/Resources-for-slog.md +++ b/Resources-for-slog.md @@ -16,6 +16,7 @@ This page links to projects that use or enhance [`slog`](https://pkg.go.dev/log/ - [zapr](https://github.com/go-logr/zapr): starting with v1.3.0, both slog/logr and go-logr/logr APIs are supported by the same logger instance. #### Logging Middleware +- slog-context: store attributes or the logger in context: https://github.com/veqryn/slog-context - slog-dedup: deduplication of attribute keys for use with json logging: https://github.com/veqryn/slog-dedup #### HTTP server middleware