From 8cfe5063dab0384b7268f817426d1f77c9d8daf8 Mon Sep 17 00:00:00 2001 From: Jeffrey D <1289344+verygoodsoftwarenotvirus@users.noreply.github.com> Date: Mon, 4 Sep 2023 12:19:58 -0500 Subject: [PATCH] Update interfaces.md --- content/posts/interfaces.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/posts/interfaces.md b/content/posts/interfaces.md index c7c30c1..8e09f19 100644 --- a/content/posts/interfaces.md +++ b/content/posts/interfaces.md @@ -59,7 +59,7 @@ Having things configured this way makes it trivial to switch between logging ins # New Toys -Recently Go 1.21 introduced [the slog package](https://pkg.go.dev/log/slog), which is the standard library implementation of a structured logger like those I mentioned above. I immediately wanted to make use of it (and I think it might even make sense to one day rip my interface out and just use a `*slog.Logger` instead). To make use of it in the meantime, I was able to start making use of slog in my app by: +Recently Go 1.21 introduced [the slog package](https://pkg.go.dev/log/slog), which is the standard library implementation of a structured logger like those I mentioned above. I wanted to use it, and I was able to start doing so in my app by: 1. writing a `slog`-compatible implementation of the `logging.Logger` interface and 2. changing the config to specify that the `slog` logging provider should be used.