71 words, 1 min read
⚠️ This post links to an external website. ⚠️
The standard library's
log/slogpackage has a two-part design. A "frontend," implemented by theLoggertype, gathers stuctured log information like a message, level, and attributes, and passes them to a "backend," an implementation of theHandlerinterface. The package comes with two built-in handlers that usually should be adequate. But you may need to write your own handler, and that is not always straightforward. This guide is here to help.
continue reading on github.com
If this post was enjoyable or useful for you, please share it! If you have comments, questions, or feedback, you can email my personal email. To get new posts, subscribe use the RSS feed.