美文网首页linux
docker logs实时查看日志tail

docker logs实时查看日志tail

作者: 哪个鹿 | 来源:发表于2019-06-06 11:06 被阅读0次
docker logs -f -t --since="2017-05-31" --tail=10 container
  • 说明:
    --since : 指定输出日志开始日期。
    -f : 查看实时日志
    -t : 查看日志产生的时间戳
    -tail=10 : 查看最后的10条日志。
    container : 容器名
docker logs -f --until=2s
  • 说明:
    相对时间(relative):2013-01-02T13:23:37
    绝对时间(timestamp):42m for 42 minutes
docker logs [OPTIONS] CONTAINER

Options

Name, shorthand Default Description
--details Show extra details provided to logs
--follow , -f Follow log output
--since Show logs since timestamp (e.g. 2013-01-02T13:23:37) or relative (e.g. 42m for 42 minutes)
--tail all Number of lines to show from the end of the logs
--timestamps , -t Show timestamps
--until Show logs before a timestamp (e.g. 2013-01-02T13:23:37) or relative (e.g. 42m for 42 minutes)

相关文章

网友评论

    本文标题:docker logs实时查看日志tail

    本文链接:https://www.haomeiwen.com/subject/dguyxctx.html