{"id":"slog","name":"log/slog","category":"logging","modulePath":"std","importPath":"log/slog","summary":"Structured logging in the Go standard library","capabilities":["structured-logging","json"],"tradeoffs":["Custom output destinations may need a separate handler."],"standardLibrary":true,"source":{"url":"https://pkg.go.dev/log/slog","kind":"editorial summary of maintainer documentation","reviewedAt":"2026-09-30"},"metadata":{"version":"go1.27.1","goVersion":"1.21","licenses":["BSD-3-Clause"],"dependencies":[],"fetchedAt":"2026-09-30T18:12:14.979Z","sourceUrls":["https://go.dev/LICENSE","https://pkg.go.dev/log/slog"],"vulnerabilities":{"status":"unknown","ids":[],"checkedAt":null,"source":null},"freshness":"current"},"example":{"id":"slog","code":"package main\n\nimport (\n    \"log/slog\"\n    \"os\"\n)\n\nfunc main() {\n    logger := slog.New(slog.NewJSONHandler(os.Stdout, nil))\n    logger.Info(\"application started\", \"service\", \"example\")\n}\n","packageVersion":"go1.27.1","goVersion":"go1.27.1","verification":{"status":"passed","checkedAt":"2026-09-30T18:16:17.639Z","targets":["linux/amd64","windows/amd64"],"cgoEnabled":false},"notes":["Compile verification covers this example only. It does not test runtime behavior or every optional feature."],"goMod":"module example.com/discovery/slog\n\ngo 1.27.1\n","goSum":""}}