How to see untrimmed logs on Heroku Local

2020-07-06 03:05发布

I'm running a NodeJS app on heroku local, however all my console.log statements and error messages get trimmed.

For example:

forego | starting web.1 on port 5000
web.1  | module.js:339

I don't see the full error logs. How to avoid this trimming of error messages?

2条回答
forever°为你锁心
2楼-- · 2020-07-06 03:08

heroku local will run whatever processes you tell it to in the Procfile. If you'd like to stream your development log, simply add something like log: tail -f log/development.log to your Procfile. You'll also want to make sure that you create a second Procfile (I use Procfile.dev) for this. Replace the log file path with wherever your desired log file is located.

Cheers!

查看更多
何必那么认真
3楼-- · 2020-07-06 03:21

Did you try?

$ heroku help local

Source: https://devcenter.heroku.com/articles/heroku-local

Is this deployed already? If so:

On terminal/bash:

$ heroku logs

On your heroku account:

1) Go to you account and then apps and then the log for that app

查看更多
登录 后发表回答