Skip to content

Commit

Permalink
Update interfaces.md
Browse files Browse the repository at this point in the history
  • Loading branch information
verygoodsoftwarenotvirus authored Sep 4, 2023
1 parent 516b452 commit 8cfe506
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion content/posts/interfaces.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 8cfe506

Please sign in to comment.