HubDocs

CLI reference / hub app <name>

hub app <name> logs

Show build and runtime logs.

View Markdown

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

CLI
hub app <name> logs [options]

Arguments

ArgumentDescription
<name>The app, or app/instance for an instance other than prod, such as my-app/staging.

Options

OptionDescription
--followFollow new build and runtime output until Ctrl-C. Default: false.
--no-followPrint 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.
--buildShow only the build log of the newest release.
--release <n>With --build, the release whose build log to show.
--jsonReturn one bounded log snapshot (tail 1–1000); never follow.

Examples

CLI
# 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

On this page