- Kubernetes for Developers
- Joseph Heck
- 117字
- 2021-08-27 19:04:16
Getting logs from your application
Just like the Python example, the Node.js example sends some output to STDOUT. As the containers are specifically set up to capture any output to STDOUT and STDERR from the executable you've specified and capture that into logs, the same commands will work to show you the log output from the Node.js application:
kubectl logs nodejs-568183341-2bw5v
This should show you output akin to the following:
> kfd-nodejs@0.0.0 start /src
> node ./bin/www
Sat, 16 Sep 2017 10:06:41 GMT kfd-nodejs:server Listening on port 3000
GET / 304 305.615 ms - -
GET /favicon.ico 404 54.056 ms - 855
GET /stylesheets/style.css 200 63.234 ms - 111
GET / 200 48.033 ms - 170
GET /stylesheets/style.css 200 1.373 ms - 111
推薦閱讀
- 流處理器研究與設計
- 網(wǎng)絡組建與互聯(lián)
- RPA(機器人流程自動化)快速入門:基于Blue Prism
- 大數(shù)據(jù)技術與應用
- 計算機網(wǎng)絡安全
- Nginx高性能Web服務器詳解
- Mastering Game Development with Unreal Engine 4(Second Edition)
- Windows Server 2008 R2活動目錄內(nèi)幕
- INSTANT Puppet 3 Starter
- Mastering Geospatial Analysis with Python
- 經(jīng)典Java EE企業(yè)應用實戰(zhàn)
- 實戰(zhàn)Windows Azure
- Office 2010輕松入門
- 智能座艙之車載機器人交互設計與開發(fā)
- D3.js Quick Start Guide