Skip to content
Dashboard

Logs and status

Copy page
View as Markdown

Grayspar keeps what your service prints to its standard output and standard error, so you can see what happened when something goes wrong. The dashboard shows the same logs in each service’s menu.

To print what a service has printed, with the time on each line, run grayspar logs. To keep following new lines as they arrive, add -f:

Terminal window
grayspar logs
grayspar logs -f

When a project has several services, name the service with --service:

Terminal window
grayspar logs --service api

Grayspar keeps log lines for a period set by your plan. An app that prints in a tight loop has some of its lines dropped.

To read the log of the last build, add --build. To follow a build that is still running, add -f as well:

Terminal window
grayspar logs --build

When a build fails, grayspar deploy prints the end of the build log, along with this command for the rest. When a service builds and then fails to start, grayspar deploy points you to grayspar logs.

To start a fresh copy of the running version, run grayspar restart. The copy keeps the same image, variables and volume, and nothing is built:

Terminal window
grayspar restart
Terminal window
Restarting app.
To follow it, run
grayspar status

A restart deletes the files your app wrote outside its volume. An app that crashes also starts again by itself, and Grayspar waits a little longer after each crash.

To see each service’s address and status, run grayspar status:

Terminal window
<project-name>
SERVICE URL STATUS
app https://<project-name>.grayspar.com Running

Each service shows one of six statuses:

Status Meaning
Deploying A new version is starting and hasn’t gone live yet.
Running The service is up.
Restarting A fresh copy is starting.
Crashed The app has stopped.
Unknown Grayspar hasn’t heard from the server running this service for a short while.
Failed The first deploy never went live.

When an app stops answering, or nothing has gone live yet, the people you shared the project with see a page saying so at the project’s address. Refreshing that page tries again.