CLI reference / hub app <name>
hub app <name> logs
Show build and runtime logs.
Print recent output and exit. Use --follow to stream build and runtime logs.
By default, print one snapshot of recent output and exit. With --follow, show the build as it happens, then the output of the app once the new release runs. A deploy that starts later shows up the same way. Lines about the release (building, running, failed) go to stderr, so redirecting stdout keeps the log alone. Press Ctrl-C to stop.
Usage
hub app <name> logs [options]Arguments
| Argument | Description |
|---|---|
<name> | The app, or app/instance for an instance other than prod, such as my-app/staging. |
Options
| Option | Description |
|---|---|
--follow | Follow new build and runtime output until Ctrl-C. Default: false. |
--no-follow | Print recent output and exit (default). |
--tail <n> | Recent lines of the running app to start with. Default: 200. |
--service <name> | Service to show, default the public service. |
--build | Show only the build log of the newest release. |
--release <n> | With --build, the release whose build log to show. |
--json | Return one bounded log snapshot (tail 1–1000); never follow. |
Examples
# Print recent output and exit
hub app my-app logs
# Follow the build, then the running app
hub app my-app logs --follow
# Follow the db service of a compose app
hub app my-app logs --service db --follow
# Print the build log of release 3
hub app my-app logs --build --release 3