Skip to content

Glossary: Go Beyond the Basics

slog (log/slog)

Also written: log/slog, slog

Go's package for structured logging. `slog.Info("msg", "key", value)` logs a message with key-value pairs at a level.

Where the book teaches it

Related terms

structured logginglog levelslog.New / NewTextHandler / NewJSONHandler