{"id":15675057,"url":"https://github.com/simenandre/pino-cloud-logging","last_synced_at":"2025-08-04T07:10:35.956Z","repository":{"id":37952751,"uuid":"503075437","full_name":"simenandre/pino-cloud-logging","owner":"simenandre","description":"Pino configuration for Google Cloud Platform. Enabled structured logging!","archived":false,"fork":false,"pushed_at":"2025-07-29T21:02:18.000Z","size":232,"stargazers_count":18,"open_issues_count":14,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-04T06:16:06.572Z","etag":null,"topics":["google-cloud-platform","logging","pino","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/simenandre.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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}},"created_at":"2022-06-13T18:43:57.000Z","updated_at":"2025-06-30T15:11:57.000Z","dependencies_parsed_at":"2024-05-09T00:24:27.007Z","dependency_job_id":"e09840aa-c153-4a7a-957d-0d3a0a298dec","html_url":"https://github.com/simenandre/pino-cloud-logging","commit_stats":null,"previous_names":["cobraz/pino-cloud-logging"],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/simenandre/pino-cloud-logging","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simenandre%2Fpino-cloud-logging","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simenandre%2Fpino-cloud-logging/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simenandre%2Fpino-cloud-logging/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simenandre%2Fpino-cloud-logging/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/simenandre","download_url":"https://codeload.github.com/simenandre/pino-cloud-logging/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simenandre%2Fpino-cloud-logging/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268660145,"owners_count":24286028,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-04T02:00:09.867Z","response_time":79,"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":["google-cloud-platform","logging","pino","typescript"],"created_at":"2024-10-03T15:55:32.481Z","updated_at":"2025-08-04T07:10:35.902Z","avatar_url":"https://github.com/simenandre.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Use Pino with Google Cloud Logging\n\nThis package provides a [simple configuration][] to use with [Pino][] to make it\nadhere to Google Cloud Logging [structured logging][].\n\n[simple configuration]: src/main.ts\n[pino]: https://github.com/pinojs/pino\n[structured logging]: https://cloud.google.com/logging/docs/structured-logging\n\n## Quickstart\n\n```bash\nyarn add pino-cloud-logging\n```\n\nWhen you initialize your Pino logging instance, you'll use our `gcpLogOptions`.\n\n```typescript\nimport Pino from 'pino';\nimport { gcpLogOptions } from 'pino-cloud-logging';\n\nconst logger = Pino(gcpLogOptions());\n\nlogger.info('Hello 👋');\n```\n\nYou can extend the configuration provided by this package like this:\n\n```typescript\ngcpLogOptions({\n  level: 'INFO',\n  // Options can be found here:\n  // https://github.com/pinojs/pino/blob/master/docs/api.md#options\n});\n```\n\nYou can also provide some of the default context like this:\n\n```typescript\ngcpLogOptions(\n  {\n    /* ... */\n  },\n  { serviceName: 'hello-world', version: '2020-01-01' },\n);\n```\n\nIf you want to provide `insertId` (or any other runtime data), you can add those\nwith the `mixin` function.\n\n```typescript\ngcpLogOptions(\n  {\n    /* ... */\n  },\n  { mixin: () =\u003e ({ insertId: randomUUID() }) },\n);\n```\n\nOr even provide context from OpenTelemetry.\n\n```typescript\nimport { context, getSpan } from '@opentelemetry/api';\ngcpLogOptions(\n  {\n    /* ... */\n  },\n  { mixin: () =\u003e getSpan(context.active())?.context() ?? {} },\n);\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimenandre%2Fpino-cloud-logging","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsimenandre%2Fpino-cloud-logging","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimenandre%2Fpino-cloud-logging/lists"}