docker logs命令


查看全部:

docker logs -f 51ishare-platform_mall-biz_1

查看最后500行:

docker logs --tail 500 51ishare-platform_mall-biz_1 

查看最新日志而不读取全部:

docker logs --tail 0 -f 51ishare-platform_mall-biz_1 

查看指定时间log:

docker logs --since="2015-08-31" 51ishare-platform_mall-biz_1

最后500行转存到/data/logs07.log:

docker logs --tail 500 51ishare-platform_mall-biz_1 > /data/logs07.log