0
我已經有一個超級簡單的node.js任務在heroku中設置爲this blog。似乎一切正常,但是當我使用heroku logs --tail
時,console.log語句不顯示在控制檯中。爲什麼我的node.js heroku任務console.log語句顯示在heroku日誌中?
我的任務是這樣的:
#!/usr/bin/env node
var firebase = require('firebase')
console.log('I have loaded firebase');
我知道它的運行,因爲我沒有在pacakages.json的火力NPM包,並得到了預期的錯誤。一旦解決,一切似乎運行良好,但我沒有從我的console.log行輸出。 = [
我執行任務與heroku run reconcileTasks
並獲得在日誌尾部下面的輸出:
2016-02-25T21:47:00.483677+00:00 heroku[api]: Starting process with command `reconcileTasks` by [email protected]
2016-02-25T21:47:01.648730+00:00 heroku[run.2829]: Awaiting client
2016-02-25T21:47:01.687472+00:00 heroku[run.2829]: Starting process with command `reconcileTasks`
2016-02-25T21:47:01.945501+00:00 heroku[run.2829]: State changed from starting to up
2016-02-25T21:47:03.964158+00:00 heroku[run.2829]: Process exited with status 0
2016-02-25T21:47:03.991854+00:00 heroku[run.2829]: State changed from up to complete