{"id":15871305,"url":"https://github.com/unfunco/powerslog","last_synced_at":"2026-01-31T04:32:42.746Z","repository":{"id":236743924,"uuid":"780357909","full_name":"unfunco/powerslog","owner":"unfunco","description":"A slog handler that enriches structured logs with key fields captured from an AWS Lambda context.","archived":false,"fork":false,"pushed_at":"2024-04-30T16:06:02.000Z","size":25,"stargazers_count":2,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-09T14:49:33.735Z","etag":null,"topics":["amazon-web-services","aws","aws-lambda","aws-lambda-golang","go","golang","lambda","lambda-context","powertools","slog","slog-handler","structured-logging"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/unfunco.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-04-01T09:58:08.000Z","updated_at":"2024-04-29T11:24:04.000Z","dependencies_parsed_at":"2024-06-19T05:01:40.452Z","dependency_job_id":"09e38fd5-d67c-4d4e-917f-cd11f7b6c414","html_url":"https://github.com/unfunco/powerslog","commit_stats":null,"previous_names":["unfunco/powerslog"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/unfunco/powerslog","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unfunco%2Fpowerslog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unfunco%2Fpowerslog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unfunco%2Fpowerslog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unfunco%2Fpowerslog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/unfunco","download_url":"https://codeload.github.com/unfunco/powerslog/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unfunco%2Fpowerslog/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28929701,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-31T04:05:25.756Z","status":"ssl_error","status_checked_at":"2026-01-31T04:02:35.005Z","response_time":128,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["amazon-web-services","aws","aws-lambda","aws-lambda-golang","go","golang","lambda","lambda-context","powertools","slog","slog-handler","structured-logging"],"created_at":"2024-10-06T00:42:45.877Z","updated_at":"2026-01-31T04:32:42.730Z","avatar_url":"https://github.com/unfunco.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Powerslog\n\nA slog handler that captures key fields from an AWS Lambda context and produces\nstructured logs with the same fields as the Powertools loggers for Python and\nTypeScript.\n\n## Getting started\n\n### Requirements\n\n- [Go] 1.22+\n\n### Installation and usage\n\n```go\npackage main\n\nimport (\n    \"context\"\n    \"log/slog\"\n    \"net/http\"\n    \"os\"\n\n    \"github.com/aws/aws-lambda-go/events\"\n    \"github.com/aws/aws-lambda-go/lambda\"\n    \"github.com/unfunco/powerslog\"\n)\n\nfunc handler(ctx context.Context, event events.APIGatewayProxyRequest) (events.APIGatewayProxyResponse, error) {\n    logger := ctx.Value(\"logger\").(*slog.Logger)\n    logger.Info(\"Request received\", slog.Any(\"event\", event))\n\n    return events.APIGatewayProxyResponse{\n        StatusCode: http.StatusNoContent,\n    }, nil\n}\n\nfunc main() {\n    jsonHandler := slog.NewJSONHandler(os.Stdout, nil)\n    powerslogHandler := powerslog.NewHandler(jsonHandler)\n    logger := slog.New(powerslogHandler)\n\n    ctx := context.WithValue(context.Background(), \"logger\", logger)\n    lambda.StartWithOptions(handler, lambda.WithContext(ctx))\n}\n```\n\n### Development and testing\n\n```bash\ncd lambda\nGOOS=linux GOARCH=arm64 go build -tags lambda.norpc -o bootstrap main.go\nsam deploy --guided\n```\n\n## License\n\n© 2024 [Daniel Morris]\\\nMade available under the terms of the [MIT License].\n\n[daniel morris]: https://unfun.co\n[go]: https://go.dev\n[mit license]: LICENSE.md\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funfunco%2Fpowerslog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Funfunco%2Fpowerslog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funfunco%2Fpowerslog/lists"}