This article provides a solution for the issue where the Adobe Commerce on cloud infrastructure UI shows the log snipped because it was too long error message when trying to view deployment log.
Adobe Commerce on cloud infrastructure (all supported versions)
When trying to view deployment log, Adobe Commerce on cloud infrastructure UI shows the following error message: log snipped because it was too long.
Note that the log shown in the UI should not be treated as the source of truth, especially if you find that the site is not responding or working properly after the deployment was listed with a status of Success. You should also verify with the logs on the server. Refer to View and manage logs in our developer documentation.
Make sure that you have Magento Cloud CLI installed in your local environment.
Run the following command:
magento-cloud activity -p <project id> -e <environment>
It will return an output similar to the following:
Activities on the project <project name> (project id), environment <environment>:
+---------------+---------------------------+-------------------------------------+----------+----------+---------+
| ID | Created | Description | Progress | State | Result |
+---------------+---------------------------+-------------------------------------+----------+----------+---------+
| l5wgwmzwrsskg | 2021-06-01T08:18:02-07:00 | ABC merged Integration into Staging | 100% | complete | success |
| raah5xrhqz3wg | 2021-06-01T08:07:18-07:00 | XYZ pushed to Integration | 100% | complete | failure |
Copy the activity ID of the affected deployment and then run the command:
magento-cloud activity:log <activity ID> -p <project id> -e <environment>
Example to examine the log of the failed deployment:
magento-cloud activity:log raah5xrhqz3wg -p <project id> -e <environment>