> For the complete documentation index, see [llms.txt](https://codemash.gitbook.io/codemash/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://codemash.gitbook.io/codemash/cloud/logs/integrations/providers/gcp-cloud-logging.md).

# Google Cloud Logging

Connect Google Cloud Logging to Logs — planned; there is no form in Cloud and Norbix refuses to save it yet.

Google Cloud Logging is the log service of Google Cloud; entries would be written with its entries.write API into a log of your project.

{% hint style="warning" %}
Cloud has no screen for Google Cloud Logging: it is not in the picker, and its address shows *This is an internal platform-monitoring provider, configured by the Norbix host operator — it is not a project integration. Please pick a provider from the integrations list.* Saving it from the SDK, the CLI or the API is refused: *The 'GCPCloudLogging' logging provider isn't available yet. Support for it is coming soon — for now you can use Norbix Logging or Datadog for project logging.* To keep your logs today, use [Norbix Logging](/codemash/cloud/logs/integrations/providers/norbix-logging.md).
{% endhint %}

<figure><img src="https://712692422-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHy372bqsaex2cqS3ikhL%2Fuploads%2Fgit-blob-0c0e208e04476ef94424e9921e76afaec04581fa%2Famqp-new-1.png?alt=media" alt="The address /logging/integrations/new/gcp-cloud-logging shows the text This is an internal platform-monitoring provider, configured by the Norbix host operator — it is not a project integration."><figcaption><p>The Google Cloud Logging address in Cloud today.</p></figcaption></figure>

## Get your credentials

What Google Cloud Logging will ask for, from its own documentation:

1. In the Google Cloud console, choose the **project** that should hold the logs and note its project id.
2. Create a service account with the **Logs Writer** role and a JSON key for it. See [Create and delete service account keys](https://cloud.google.com/iam/docs/keys-create-delete). Norbix would call [entries.write](https://cloud.google.com/logging/docs/reference/v2/rest/v2/entries/write).

## Connect it in Cloud

**Where:** nowhere yet — no card, no form (`/projects/<project>/logging/integrations/new/gcp-cloud-logging` shows the text above).

The fields will be listed here when the form ships.

## Test and set as default

There is nothing to test until Google Cloud Logging can be saved. When it can, **Test integration** works as described in [Test an integration](/codemash/cloud/logs/integrations/test.md); logging has no default integration ([Default integration](/codemash/cloud/logs/integrations/set-default.md)).

## Common errors

| Message                                                                                                                                                                        | Cause                                         | Fix                                                                                  |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------- | ------------------------------------------------------------------------------------ |
| The 'GCPCloudLogging' logging provider isn't available yet. Support for it is coming soon — for now you can use Norbix Logging or Datadog for project logging.                 | Every save of Google Cloud Logging today.     | Use [Norbix Logging](/codemash/cloud/logs/integrations/providers/norbix-logging.md). |
| This is an internal platform-monitoring provider, configured by the Norbix host operator — it is not a project integration. Please pick a provider from the integrations list. | You opened `/new/gcp-cloud-logging` in Cloud. | Use [Norbix Logging](/codemash/cloud/logs/integrations/providers/norbix-logging.md). |

## Do it from code

```ts
const { id } = await norbix.hub.logs.saveLoggingIntegration({
  projectId,
  integration: {
    provider: 'GCPCloudLogging',
    integrationName: 'GCP',
    isEnabled: true,
  } as any, // the TS type knows only the shared fields
});
// throws: The 'GCPCloudLogging' logging provider isn't available yet. …
```

```sh
norbix hub logs logging integration save --projectId "$NORBIX_PROJECT_ID" --integration '{"provider":"GCPCloudLogging","integrationName":"GCP","isEnabled":true}'
```

The provider is written `GCPCloudLogging` in requests. The client setup is on the [Logs page](/codemash/cloud/logs.md#use-it-from-code). API: [Save Logging Integration](/codemash/api-reference/logs/integrations/save-logging-integration.md)
