Created
March 29, 2025 04:36
-
-
Save softprops/e3b4b2166c6404c12278b29f2f3e43e8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"log/slog" | |
"os" | |
) | |
func main() { | |
log := slog.New(slog.NewJSONHandler(os.Stdout, nil)).With("foo", "bar") | |
log.Info("hello", "baz", "boom") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment