Go Structured Logging with the slog Package (Golang)

preview_player
Показать описание
In this video, we take a look at the 'slog' package in Go - a recent addition to the standard library that allows for structured logging and better built-in logging capabilities!

► RELATED GUIDES
Logging in Go: A Comparison of the Top 9 Libraries

A Complete Guide to Logging in Go with Zerolog:

A Comprehensive Guide to Zap Logging in Go:

► HACKING SCALE NEWSLETTER

► READ MORE

► STAY TUNED

📌 𝗖𝗵𝗮𝗽𝘁𝗲𝗿𝘀:
00:00 Intro
05:15 slog package in Go
09:43 Setting default log level
11:26 Logging custom data to the output
16:00 Groups with slog.Group
19:56 Child loggers for consolidating attributes
24:23 Logging to Files
29:05 Logging to multiple destinations with io.MultiWriter
30:31 Redacting data by implementing LogValuer interface

#golangtutorial #golang #logging
Рекомендации по теме
Комментарии
Автор

Underrated video. Deserves 10x more like if not more.

algo
Автор

Most simple explanation really enjoyed your video thankyou

anonymous-skli