docker logs 日志参数解释

docker logs  -f  -t  --since="2019-04-15T02:14:00"  --tail=1000  9c03ea2c

-f:实时显示

-t:显示日志生成时的时间戳(默认中时区)

--since:从指定时间戳开始(默认中时区,即在北京东八区的时间戳上减去8小时)

--tail:显示最后的条数

9c03ea2c:容器名

[root]# docker logs --help

Usage:	docker logs [OPTIONS] CONTAINER

Fetch the logs of a container

  -f, --follow=false        Follow log output
  --help=false              Print usage
  --since=                  Show logs since timestamp
  -t, --timestamps=false    Show timestamps
  --tail=all                Number of lines to show from the end of the logs

猜你喜欢

转载自blog.csdn.net/yzh_1346983557/article/details/89306777