Observe
Logs
Read a deployment's build log and stream what a running container writes, with search and filters.
Updated
Cloud shows two kinds of log. A build log belongs to one deployment and records how it was built and released. A runtime log belongs to one running container and records what your application writes to its output. Both are read live from the platform when you open them: Cloud keeps no copy of its own.
Build logs
Every deployment has its own page with a Build log. Pressing Deploy opens that page at once; later, open it from the Deployments page or from a service's Deployments section.
The log streams line by line while the deployment runs. Until the platform has started the build there is nothing to read, and the log says "The engine has not started this build yet."; while the deployment is still in progress the page asks again every second, so the first lines arrive without a reload.
A database has no build: the platform pulls its image and starts it. Its deployment's page shows the Database log instead, the database's own output, which starts once the database runs. Deployments explains the statuses and what a failed deployment's sentence means.
A build log has no line limit, time range or log type: it is the whole build. Search, copy, download and hold work on it as they do on a runtime log.
Runtime logs
There are two places to read what a service writes:
A service's Logs section streams the service's first running container. It is there while the service is Running or in Error; otherwise it reads "Nothing is running. Deploy the service and its log appears here."
The Logs page in the rail reads any service of the organization the console is in. Pick one under Service. When the service has more than one container (replicas, or the containers of a compose stack), a row of container links appears, each with its state, and the log is titled "Log of" and the container's name.
Each line shows the time the platform recorded it, in your browser's time zone, with the date added for lines from an earlier day.
How much history
Two menus decide what the log opens on:
| Menu | Choices | Opens on |
|---|---|---|
| Line limit | 100 lines, 300 lines, 1000 lines, 5000 lines | 300 lines |
| Time range | Last hour, Last 6 hours, Last 24 hours, Last 7 days, Last 30 days | Last 30 days |
The log shows the latest lines inside the time range, up to the line limit, then follows new lines as they arrive. Changing either menu opens the log again from the platform, so the view empties and refills.
Thirty days is as far back as a runtime log reaches, and a log starts where its container started. A deploy starts new containers, so after a deploy the log you open is the new container's.
Search and log type
The search field (Search the log) and the Log type menu narrow the lines already in the view. Neither is sent to the platform, so a search never reaches further back than the line limit and time range. The count beside the status reads, for example, "40 of 300 lines", and a search that matches nothing reads "No line matches."
Log type offers All types, Error, Warning, Success, Info and Debug. Cloud reads a line's type in this order:
A level the line declares: a
level,severityorlog.levelfield in a JSON line (including the numeric levels of loggers such as pino), orlevel=in a logfmt line.An HTTP status in the line: 5xx is an error, 4xx a warning, 2xx a success.
Its words:
error,fatal,failedor an exception mark an error;warn,deprecatedorretryinga warning;done,readyorlisteninga success;debug:,traceorverbosea debug line.
Anything else is Info. A line that says a fault is absent, such as errors=0 or error: none, is not read as an error. If your application writes structured logs with a level field, the type is always the one it declared.
Hold, copy and download
Hold the log still (the pause button) stops the view from moving so you can read a line. Lines that arrive meanwhile are kept, the status reads "Held" with how many are waiting, and Let the log move adds them in order.
The view follows the newest line until you scroll up, and follows again once you scroll back to the end.
Copy and Download take the lines the view shows, after any search or log type, each with its timestamp. Download saves them as a
.logtext file.The view keeps the latest 5000 lines. Past that, the status reads "last 5000" and the oldest lines drop off the top.
There is no log forwarding to another service. Download is how a log leaves Cloud.
When a log closes
A log is a live connection. Its status chip reads Connecting, Live or Closed, and a closed log shows why beside the chip, with Reconnect to open it again:
| Sentence | What happened |
|---|---|
| Closed after 10 minutes without output. | The service wrote nothing for ten minutes. Only the service's own output counts, not you reading. |
| The engine closed the connection. | The container stopped or was replaced by a deploy, or the stream ended. |
| Nothing is running. | The service has no running container to read. |
| The engine has not started this build yet. | The build log of a deployment the platform has not started. |
| A database has no build log. Its own log is the service's log. | A build log asked for a database's deployment. |
| Too many open connections. Close one and try again. | Your account already has 8 logs, terminals and SSH sessions open, or the platform is at its own ceiling for a moment. |
| The engine did not answer. Try again in a minute. | The platform did not respond. |
| Your workspace is still being prepared. | The workspace of the service's organization is not ready yet. |
| Sign in to continue. | Your session ended. Sign in and open the log again. |
| That does not exist. | The service or deployment was deleted, or the link names one that is not yours. |
| The connection was lost. | The network dropped between your browser and Cloud. |
Logs and terminal closed goes through each of these in more depth, and Limits lists every ceiling in one place.