dcos task log

Displaying the task log


The dcos task log command displays the task log.


dcos task log [--all | --completed] [--follow --lines=N] [<task>] [<file>]


Name Default Description
--all Displays all information recorded for tasks.
--completed Displays completed and in-progress tasks.
--follow Dynamically update the log.
--lines=N 10 Displays the last N lines.

Positional arguments

Name Default Description
<task> A full task ID, a partial task ID, or a regular expression.
<file> stdout Specify the sandbox file to print. The default is stdout.

The log file parameters should be paths relative to the Mesos sandbox. For example:

dcos task log [mesosID] /mnt/mesos/sandbox/exporter.log

will return an error message. Instead, use this format:

dcos task log [mesosID] exporter.log


For an example, see the logging documentation.

Parent command

Command Description
dcos task Manage DC/OS tasks.