Checking deployment log if cloud UI has log snipped error

This article provides a solution for the issue where Adobe Commerce on cloud infrastructure UI shows the log snipped because it was too long error message when trying to view the deployment log on the cloud project UI. (Does not apply to the Adobe Commerce Cloud Console.)

Affected products

Adobe Commerce on cloud infrastructure (all supported versions)

Issue

When trying to view the deployment log on the cloud project UI, Adobe Commerce on cloud infrastructure UI shows the following error message: log snipped because it was too long.

Steps to reproduce

  1. Go to the Project URL and click on the Status of the deployment in question.
  2. If the log is too long to be displayed in the UI, it will show the error message: log snipped because it was too long.

Cause

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.

Solution

  1. Make sure that you have Magento Cloud CLI installed in your local environment.

  2. Run the following command:

    code language-bash
    magento-cloud activity -p <project id> -e <environment>
    
  3. It will return an output similar to the following:

    code language-bash
    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 |
    
  4. Copy the activity ID of the affected deployment and then run the command:

    code language-bash
    magento-cloud activity:log <activity ID> -p <project id> -e <environment>
    

    Example to examine the log of the failed deployment:

    code language-bash
    magento-cloud activity:log raah5xrhqz3wg -p <project id> -e <environment>
    
recommendation-more-help
8bd06ef0-b3d5-4137-b74e-d7b00485808a