// Chapter 47 example: log lines with log/slog, a level and key-value pairs. // Run with: go run exercises/47/01-slog-basics.go package main import ( "errors" "log/slog" ) func main() { slog.Info("server starting", "addr", "localhost:8080") slog.Warn("notes file is large", "file", "notes.json", "notes", 950) slog.Error("could not save", "err", errors.New("disk full")) slog.Debug("this line is hidden", "reason", "the level is too low") }