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