How to see untrimmed logs on Heroku Local
Asked Answered
M

2

10

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?

Micheal answered 8/12, 2015 at 12:42 Comment(4)
Did you manage to find a solution for this?Montoya
BTW, you can start the app without heroku using something like node bin/www and see the output there.Montoya
@Montoya But what about environment variables that heroku local provides?Micheal
They have to be simulated in this case regretfully. This is why this was not submitted as an answer but as a comment.Montoya
P
13

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!

Purifoy answered 31/3, 2017 at 22:13 Comment(0)
U
-6

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

Unwieldy answered 3/8, 2016 at 6:32 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.