News for hackers. Stuff that matters.
Re:Structured Logging with Slog by AkshitGarg on Wednesday August 23, 2023 @02:11AM (#37232383)
You use attrs [1] instead. I personally find this much more readable, and prefer this.

  slog.Info("hello, world", slog.String("user", os.Getenv("USER")))
[1]: https://pkg.go.dev/log/slog#hdr-Attrs_and_Values

There are no comments on this comment yet.