# PageBuilder Engine log forwarding

Source: https://dev.arcxp.com/pagebuilder-engine/core-concepts/pagebuilder-engine-log-forwarding/

As a developer, you need access to PageBuilder Engine logs for your websites running on Arc XP. Arc XP uses [AWS Cross-Account Log Data Sharing With Subscriptions](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CrossAccountSubscriptions.html) to deliver PageBuilder Engine logs to your AWS Amazon Resource Name (ARN).

## Requirements

- You must have an AWS account and can share the account number with Arc XP
- You must set up the [Destination](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CreateDestination.html) in the same region that Arc XP is hosting the client and has shared their [DestinationArn](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CreateDestination.html) with Arc XP. We recommend the following naming convention for the ARN: `arn:aws:logs:us-east-1:{customer_aws_account}:destination:LogsArcPageBuilder{Org}{Environment}`.

  - `customer_aws_account` is your account value.
  - `Org` is your organization name referenced in your Arc XP URL, for example, `[org].arcpublishing.com`.
  - `Environment` is optional and should be included if you want to set up a different destination for Production, Sandbox, and Development. If you don’t set up different destinations, then exclude this value.
- You must agree to incur the associated AWS costs for the logs sent to your account and accept that the amount of log data is variable based on your website usage and the log messages that the Arc XP product logs.
- You are responsible for troubleshooting setup and delivery issues with your [Destination](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CreateDestination.html).

## Setup requirements

To setup the log forwarding, follow the steps in the [How to configure Fusion Engine logs forwarding](https://dev.arcxp.com/pagebuilder-engine/developer-docs/how-to-configure-fusion-engine-logs-forwarding/#2-establish-iam-trust-policy/) document, which guides you through:

- [Creating a Kinesis Data Stream](https://dev.arcxp.com/pagebuilder-engine/developer-docs/how-to-configure-fusion-engine-logs-forwarding/#1-create-a-kinesis-data-stream)
- [Establishing the necessary IAM roles and policies](https://dev.arcxp.com/pagebuilder-engine/developer-docs/how-to-configure-fusion-engine-logs-forwarding/#2-establish-iam-trust-policy)
- [Configuring the CloudWatch Logs destination](https://dev.arcxp.com/pagebuilder-engine/developer-docs/how-to-configure-fusion-engine-logs-forwarding/#4-configure-the-cloudwatch-logs-destination)

> **Important:**
> 
> The AWS region for your destination account must match the Arc XP Platform deployment region, for example, `us-east-1`, `eu-central-1`, `ap-northeast-1`, or `ap-southeast-2`.

After performing the setup instructions, create an [Arc XP Customer Support](https://arcpublishing.atlassian.net/servicedesk/customer/portal/2) ticket to enable log delivery by including the following information:

- AWS Account ID
- AWS Destination(s) by log source

## Log Sources Provided

To read these logs, see [How To Read Engine Logs](https://dev.arcxp.com/pagebuilder-engine/developer-docs/how-to-read-engine-logs).

`compiler` represents deployment logs

`engine` represents server rendering and fetching logs

`resolver` represents request resolving logs

- `/aws/lambda/fusion-compiler-[ORG]-development`
- `/aws/lambda/fusion-compiler-[ORG]-sandbox`
- `/aws/lambda/fusion-compiler-[ORG]-[ORG]`
- `/aws/lambda/fusion-engine-[ORG]-development`
- `/aws/lambda/fusion-engine-[ORG]-[ORG]-sandbox`
- `/aws/lambda/fusion-engine-[ORG]`
- `/aws/lambda/fusion-resolver-[ORG]-development`
- `/aws/lambda/fusion-resolver-[ORG]-sandbox`
- `/aws/lambda/fusion-resolver-[ORG]`
