Comment Comment by AkshitGarg 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 parent AkshitGarg 3 years ago