Docker查看容器日志及日志时间


 description

追踪查看test容器的日志内容以及日志输出时间

 command

docker logs -f -t test

 parameter

logs :  获取容器的日志
-f, --follow :  跟踪日志输出
-t, --timestamps :  显示时间

 result

 2021-05-03T09:21:41.445320706Z 
2021-05-03T09:21:41.445386266Z   .   ____          _            __ _ _
2021-05-03T09:21:41.445392232Z  /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
2021-05-03T09:21:41.445396652Z ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
2021-05-03T09:21:41.445400634Z  \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
2021-05-03T09:21:41.445404226Z   '  |____| .__|_| |_|_| |_\__, | / / / /
2021-05-03T09:21:41.445407846Z  =========|_|==============|___/=/_/_/_/
2021-05-03T09:21:41.445411436Z  :: Spring Boot ::                (v2.4.3)

I hope to help every developer quickly find the commands they need. Of course, you can also add your own commonly used commands for easy searching.