Golang: Structured Logging using slog

preview_player
Показать описание
Welcome to a concise overview of structured logging in Go.

This video discusses the specifics of structured logs, highlighting how they stand out from plain text and explores Go's new slog package.
It also covers customization techniques, emphasizing the role of Handlers and the enhancement of logs through key/value pairs.

For a practical perspective, this video provides code walkthroughs, detailing the creation of custom handlers and best logging practices. Furthermore, it presents ways how we can add values from the context into log statements.

Timecodes
0:00 - Intro
0:17 - Concept
0:41 - slog Basics
1:27 - Handlers
1:54 - Global Config
2:17 - Key/Value Pairs
2:48 - Using Context
Рекомендации по теме
Комментарии
Автор

@2:48 the decorator pattern is a neat idea - thanks!

matthias
join shbcf.ru