Use logs for troubleshooting

This topic discusses how you can use logs to troubleshoot problems related to Magento Enterprise Cloud Edition build hooks and deploy hooks.

Build logs

After pushing to your environment, you can see the results of the both hooks. Logs from the build hook are redirected to the output stream of git push, so you can observe them in the terminal or capture them (along with error messages) with git push > build.log 2>&1.

Deploy logs

Logs from the deploy hook are located on the server in the following locations:

  • Integration system: /tmp/log/deploy.log
  • Staging or production systems: /var/log/platform/<user>/post_deploy.log

    The value of <user> depends on the project ID and whether the environment is staging or production. For example, with a project ID of yw1unoukjcawe, the staging environment user is yw1unoukjcawe_stg and the production environment user is yw1unoukjcawe.

    So on a staging environment for project yw1unoukjcawe, the deploy log is located at /var/log/platform/yw1unoukjcawe_stg/post_deploy.log.

Logs for all deployments that have happened on this environment are appended to this file, so check the timestamps on log entries to verify that you’re seeing the logs that correspond to the deployment that you are interested in.

The actual log output is highly verbose to allow troubleshooting. Following is a condensed example:

[2016-10-11 22:15:38] Starting pre-deploy.
...
[2016-10-11 22:15:39] Pre-deploy complete.
[2016-10-11 22:15:42] Start deploy.
[2016-10-11 22:15:42] Preparing environment specific data.
[2016-10-11 22:15:42] Initializing routes.

... more ...

[2016-10-11 22:15:46] Deployment complete.

The deploy log contains start and stop messages for each of the two hooks: Starting pre-deploy, Pre-deploy complete., Start deploy., and Deployment complete..