Read logs
Read the build log of a deploy and follow the output of a running app.
LILY keeps two logs per app. The build log is what the build prints: installing dependencies, compiling, errors. The app output is what your running app prints. This guide reads both. Logs lists what is kept.
Before you start
- An app that was deployed at least once. The examples use
copperfox.
Steps
Follow a running app
Open the app and select the Log tab. It has two sections, Build log and App output, and a search field. The log streams live.
To see all apps of a project in one stream, select Logs in the project sidebar. It has an app filter and a search.
lly attach copperfox
lly attach copperfox --tail 100 # start with the last 100 linesThe stream runs until you press Ctrl-C.
Read the build log
The Build log section of the Log tab holds the output of the last build.
lly attach copperfox --build
lly attach copperfox --build > build.logFind out why a deploy failed
A failed deploy records a reason. Its first word names the stage that failed:
| Reason starts with | Meaning | Where to look |
|---|---|---|
fetch: | The download from GitHub failed | Branch name and GitHub connection |
build <root>: | The build failed | The build log |
deploy to cap: | The build could not be placed on a machine | Redeploy. If it repeats, contact support |
<slug> did not go live | The app was placed but did not start | The app output |
Check that it worked
You see new lines appear while you use the app.
If it does not work
| What you see | Cause | Fix |
|---|---|---|
| The build log stops with a notice | A build log holds up to 2 MiB per app | The cause of a failure is usually in the last lines before the notice |
Exit code 4 | The app does not exist in this project | List the slugs with lly apps |
More messages and their fixes: Troubleshooting.
Use an agent
My LILY app "copperfox" failed to deploy. Run `lly attach copperfox --build`,
find the first error in the build log and suggest a fix. Do not change code without asking me.