- Kubernetes for Developers
- Joseph Heck
- 125字
- 2021-08-27 19:04:18
Timestamps
Timestamps are also available for the log output, although not by default. You can get the log messages prefixed by a timestamp by adding the --timestamps option. For example:
kubectl logs deployment/flask --timestamps
You then may see the following:
2017-09-16T03:54:20.851827407Z * Running on http://0.0.0.0:5000/ (Press CTRL+C to quit)
2017-09-16T03:54:20.852424207Z * Restarting with stat
2017-09-16T03:54:21.163624707Z * Debugger is active!
2017-09-16T03:54:21.165358607Z * Debugger PIN: 996-805-904
It is worthwhile to note that the timestamps are from the hosts that are running the containers, not your local machine, so the time zone on those logs will often not be the same time zone in which you reside. The timestamps all include full-time zone detail (typically set to the UTC-0 time zone) so the values can be converted easily.
推薦閱讀
- 平面設計初步
- Dreamweaver CS3網頁制作融會貫通
- 電腦上網直通車
- Creo Parametric 1.0中文版從入門到精通
- CompTIA Linux+ Certification Guide
- Mastering Game Development with Unreal Engine 4(Second Edition)
- 單片機C語言程序設計完全自學手冊
- 精通數據科學:從線性回歸到深度學習
- Mastering pfSense
- 空間機器人
- ZigBee無線通信技術應用開發
- Creating ELearning Games with Unity
- Win 7二十一
- Cisco UCS Cookbook
- Architectural Patterns