Files
dokku/docs/deployment/logs.md
Jose Diaz-Gonzalez 78f467852e feat: add a subcommand for retrieving failed app deploy logs
This can be useful in cases where a developer wishes to see what error messages are available for a failed deploy, but does not wish to spelunk around `docker ps -a` output.

Note that the logs are not made available once a further deploy is triggered, or after the containers have been garbage collected.
2018-07-29 17:17:53 -04:00

1.3 KiB

Log Management

logs <app> [-h] [-t] [-n num] [-q] [-p process]  # Display recent log output
logs:failed <app>                                # Shows the last failed deploy logs for an app

Usage

App Logs

You can easily get logs of an app using the logs command:

dokku logs node-js-app

Behavioral modifiers

Dokku also supports certain command-line arguments that augment the log command's behavior.

-n, --num NUM        # the number of lines to display
-p, --ps PS          # only display logs from the given process
-t, --tail           # continually stream logs
-q, --quiet          # display raw logs without colors, time and names

You can use these modifiers as follows:

dokku logs node-js-app -t -p web

will show logs continually from the web process.

Failed Deploy Logs

Warning: The default docker-local scheduler will "store" these until the next deploy or until the old containers are garbage collected - whichever runs first. If you require the logs beyond this point in time, please ship the logs to a centralized log server.

In some cases, it may be useful to retrieve the logs from a previously failed deploy.

You can retrieve these logs by using the logs:failed command

dokku logs:failed node-js-app