docker 撰写日志

描述查看容器的输出
用法docker compose logs [OPTIONS] [SERVICE...]

描述

显示服务的日志输出

选项

选项默认描述
-f, --follow跟随日志输出
--index如果服务有多个副本,则容器的索引
--no-color产生单色输出
--no-log-prefix不要在日志中打印前缀
--since显示自时间戳(例如 2013-01-02T13:23:37Z)或相对时间(例如 42m 42 分钟)以来的日志
-n, --tailall从每个容器的日志末尾开始显示的行数
-t, --timestamps显示时间戳
--until显示时间戳之前的日志(例如 2013-01-02T13:23:37Z)或相对时间戳(例如 42m 42 分钟)