The standard library's log/slog package has a two-part design. A "frontend," implemented by the Logger type, gathers stuctured log information like a message, level, and attributes, and passes them to a "backend," an implementation of the Handler interface. 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

⚠️ This post links to an external website. ⚠️