Skip to content

Glossary: Go Beyond the Basics

slog.Logger

Also written: *slog.Logger, logger.With

A logger made by `slog.New` from a handler, with `Info`, `Debug`, `Warn`, `Error` and `With`. `With` returns a new logger that adds pairs to every event.

Where the book teaches it

Related terms

slog.New / NewTextHandler / NewJSONHandlerhandler (slog)