{"id":20187996,"url":"https://github.com/arran4/gaelogger","last_synced_at":"2026-06-09T15:01:41.852Z","repository":{"id":57511936,"uuid":"232490086","full_name":"arran4/gaelogger","owner":"arran4","description":"Another google apps engine go logger this one is for the new go111+ world..","archived":false,"fork":false,"pushed_at":"2026-04-25T03:39:03.000Z","size":136,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-04-25T05:27:06.680Z","etag":null,"topics":["go","golang","google-app-engine","google-app-engine-logger","library","logger-abstraction"],"latest_commit_sha":null,"homepage":"https://pkg.go.dev/github.com/arran4/gaelogger","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/arran4.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2020-01-08T06:01:48.000Z","updated_at":"2026-04-25T03:39:07.000Z","dependencies_parsed_at":"2024-06-20T00:19:16.172Z","dependency_job_id":"8b13323e-4fbc-4d11-b6a3-ef95911b9b02","html_url":"https://github.com/arran4/gaelogger","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/arran4/gaelogger","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arran4%2Fgaelogger","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arran4%2Fgaelogger/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arran4%2Fgaelogger/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arran4%2Fgaelogger/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/arran4","download_url":"https://codeload.github.com/arran4/gaelogger/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arran4%2Fgaelogger/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34112225,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-09T02:00:06.510Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["go","golang","google-app-engine","google-app-engine-logger","library","logger-abstraction"],"created_at":"2024-11-14T03:26:56.455Z","updated_at":"2026-06-09T15:01:41.841Z","avatar_url":"https://github.com/arran4.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Note on `slog` and Ecosystem Changes\n\nAs of Go 1.21, the Go standard library includes [log/slog](https://pkg.go.dev/log/slog), a structured logging package. This is now the recommended way to perform structured logging in Go applications.\n\nFor Google Cloud (App Engine, Cloud Run, Cloud Functions), writing structured JSON logs to `stdout`/`stderr` is the recommended approach. `slog` with `JSONHandler` supports this natively.\n\n## Resources\n\n*   [Structured Logging with slog](https://go.dev/blog/slog) (Official Go Blog)\n*   [log/slog documentation](https://pkg.go.dev/log/slog)\n*   [Resources for slog](https://go.dev/wiki/Resources-for-slog) (Community Wiki)\n*   [Structured logging in Google Cloud](https://cloud.google.com/logging/docs/structured-logging)\n\n## How to Migrate to `slog`\n\nInstead of using this package, you can use `slog` directly. To make `slog` compatible with Google Cloud Logging's expectations (e.g., using `severity` instead of `level`), you can configure the handler like this:\n\n```go\nimport (\n\t\"log/slog\"\n\t\"os\"\n)\n\nfunc init() {\n\t// Configure slog to use JSON handler and map LevelKey to \"severity\"\n\topts := \u0026slog.HandlerOptions{\n\t\tReplaceAttr: func(groups []string, a slog.Attr) slog.Attr {\n\t\t\t// Google Cloud Logging uses \"severity\" instead of \"level\"\n\t\t\tif a.Key == slog.LevelKey {\n\t\t\t\treturn slog.Attr{Key: \"severity\", Value: a.Value}\n\t\t\t}\n\t\t\treturn a\n\t\t},\n\t}\n\n\tlogger := slog.New(slog.NewJSONHandler(os.Stdout, opts))\n\tslog.SetDefault(logger)\n}\n\nfunc handle(w http.ResponseWriter, r *http.Request) {\n\t// Use slog.Info, slog.Error, etc.\n\tslog.Info(\"handling request\",\n\t\t\"method\", r.Method,\n\t\t\"path\", r.URL.Path,\n        \"query\", r.URL.RawQuery,\n\t)\n}\n```\n\n---\n\n# Another google apps engine go logger this one is for the new go111+ world..\n\nUsage is simple:\n```go\nimport (\n  \"github.com/arran4/gaelogger\"\n  \"net/http\"\n)\n\nfunc init() {\n    http.HandleFunc(\"/\", handle)\n}\n\nfunc handle(writer http.ResponseWriter, request *http.Request) {\n  logger := gaelogger.NewLogger(request)\n  defer logger.Close()\n  logger.Infof(\"%s request: %v %v\", request.Method, request.URL.RawPath, request.URL.RawQuery)\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farran4%2Fgaelogger","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farran4%2Fgaelogger","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farran4%2Fgaelogger/lists"}