A focused look at the slog.Group function in Go's standard library logging package. It explains how Group creates an Attr that nests multiple key-value pairs under a single key. The TextHandler outputs grouped attributes in dot-separated notation (e.g., req.method=GET), while the JSONHandler outputs them as nested JSON objects.
10.5K Impressions1 Comment