dcos service log

显示服务日志

说明

dcos service log 命令显示服务日志。

重要信息:若要使用 dcos service log marathon 命令查看本地 DC/OS Marathon 日志,您必须位于同一网络上或者通过 VPN 连接到群集。如需更多信息,请参阅 访问本地 DC/OS Marathon 日志

使用

  1. dcos service log [--follow --lines=N --ssh-config-file=<path> --user=<user>] <service> [<file>]

选项

名称默认说明
—follow在日志文件生成后打印数据。
—lines=N10显示最后 N 行。
—ssh-config-file=<path>SSH 配置文件的路径。这用于访问 Marathon 日志。
—user=<user>用户 ID。

位置自变量

名称说明
<file>Mesos 沙盒的服务日志文件名。默认为 stdout
<service>DC/OS 服务名称。

父命令

命令说明
dcos service管理 DC/OS 服务。