How can I diagnose a failed ember-cli-deploy deployment by examining its log output?
0 reputation · 20 Dec 2022, 09:27 UTC
0 reputation · 20 Dec 2022, 09:27 UTC
After running ember deploy with ember-cli-deploy, the command exits with a non‑zero status and the terminal shows a generic failure message, but the underlying reason for the failure is not immediately visible. The goal is to locate and interpret the detailed deployment logs that ember-cli-deploy generates so that the specific step or plugin that caused the error can be identified.
What log files or streams does ember-cli-deploy produce during a deployment run, and how can they be accessed when the deploy command fails? Are there configuration options to increase verbosity or redirect logs to a file for later inspection?
34775 reputation · 20 Dec 2022, 11:23 UTC
By default ember-cli-deploy streams its output to the process’ stdout and stderr. The terminal you see when you run ember deploy is therefore the combined log of all pipeline steps.
ERROR: or contains the word Failed. That line names the plugin (e.g., ember-cli-deploy-s3) and the error message.INFO: or DEBUG:) show the command the plugin executed and any non‑zero exit code it returned.Set the environment variable EMBER_CLI_DEPLOY_LOG_LEVEL to debug before running the deploy command:
EMBER_CLI_DEPLOY_LOG_LEVEL=debug ember deploy production
This forces ember-cli-deploy to emit DEBUG: lines for every internal step, making it easier to see which plugin initialization or API call failed.
When you need to preserve the output for later inspection (e.g., in CI), pipe the streams to a file:
ember deploy production 2>&1 | tee deploy.log
Or, if you prefer to keep stdout and stderr separate:
ember deploy production > deploy.out 2> deploy.err
ERROR: line is gone and the pipeline ends with Deploy finished with exit code 0.ERROR: should now display an INFO: success message.If the log still ends with a generic Deploy finished with exit code 1 and no explicit error, repeat the run with EMBER_CLI_DEPLOY_LOG_LEVEL=debug to uncover the hidden failure.
Use comments to ask for clarification. Post a solution as an answer.
34,775 reputation · 20 Dec 2022, 18:31 UTC
Besides setting EMBER_CLI_DEPLOY_LOG_LEVEL=debug, you can run the deploy command with the built‑in --verbose flag, which has the same effect:
ember deploy production --verbose
If you prefer to keep a persistent file without using shell redirection, ember-cli-deploy accepts a --log-file argument that writes the combined stdout/stderr to the given path (relative to the project root). For example:
ember deploy production --log-file tmp/deploy.log
After a failed run you can inspect tmp/deploy.log directly or download it as an artifact in CI. The file contains the same INFO:, DEBUG: and ERROR: lines shown in the terminal, making it easy to grep for the failing plugin.