---
title: Setting up regional log aggregation
summary: null
url: >-
  https://www.fastly.com/documentation/guides/integrations/streaming-logs/setting-up-regional-log-aggregation
---

Regional log aggregation allows you to restrict log aggregation and processing to a specific geographic location. When you enable Fastly's [Real-Time Log Streaming feature](https://www.fastly.com/documentation/guides/integrations/streaming-logs/about-fastlys-realtime-log-streaming-features), you can use regional log aggregation to configure the geographic processing location of your service's logs. Logs for your service originating from all Fastly POPs are aggregated and processed within the geographic location you've selected.

You can specify one of the following predefined regions:

- **US** for the United States
- **EU** for the European Union
- **None** for global processing (no geographic restrictions)

By default, logging endpoints are set to `None`.

## Before you begin

Before setting up regional log aggregation, be sure that you've [enabled remote log streaming](https://www.fastly.com/documentation/guides/integrations/streaming-logs/setting-up-remote-log-streaming) with one or more logging endpoints for your service.

## Enabling regional log aggregation

You can enable regional log aggregation by using the Fastly control panel, API, [CLI](https://www.fastly.com/documentation/reference/cli/logging/), or [Terraform](https://registry.terraform.io/providers/fastly/fastly/latest/docs).

### Fastly Control Panel

Follow these instructions to configure regional log aggregation for a logging endpoint using the Fastly control panel:

1.   Log in to the [Fastly control panel](https://manage.fastly.com).

2.   From the [**Home**](https://manage.fastly.com/home) page, select the appropriate service. You can use the search box to search by ID, name, or domain.

3.   Click **Edit configuration** and then select the option to clone the active version.

4. Click **Logging**.
5. Click the name of the logging endpoint you want to edit.
6. From the **Processing region** menu, select a region.
7. Click **Update**.
8.   From the **Activate** menu, select **Activate on Production** to deploy your configuration changes.

### API

Run the following command to enable regional log aggregation using the [API](https://www.fastly.com/documentation/reference/api/logging/):

```term copy
$ curl -X PUT \
  -H "Fastly-Key: $fastly_key" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{"log_processing_region": "us"}' \
  "https://api.fastly.com/service/$service_id/version/$version/logging/$logging_endpoint/$log_name"
```

## Related content

- [Real-time logging API documentation](https://www.fastly.com/documentation/reference/api/logging)
- [Fastly logging CLI documentation](https://www.fastly.com/documentation/reference/cli/logging)
