In this video, I discuss structured logging in Golang with the new standard library package slog. I dive into how you can set up your logger with Slog Handlers, contextual logging with request IDs, setting up log levels in Go via flags or environment variables and some general best practices of logging in GO.
The aim of this video is to give you an idea of how you can set up logging in Go, and really just to showcase how nice Slog is in the standard lib, no more logging deps!!
Join my discord: / discord
Event-driven monolith in Go? • Event Driven Modular Monolith in Go!?...
Handling errors like a 10x engineer in Go? • Handling errors LIKE a 10x ENGINEER i...
Twitter: / samvcodes
Github: https://github.com/samverrall