Reputation: 11753
In a working Node.js app on Heroku, I have on the server side, a few lines of code like the one below:
console.log("Log trace-message ... some useful information ...")
for which I am unable to locate the effect anywhere in the logs.
Since my code is working I assume the logged messages should appear at some point.
But I see nothing (coming from my console.log) when using the: heroku logs --tail command.
As far as I can remember, I think I used to see the result of the console.log up to recently.
I have also read this page: https://devcenter.heroku.com/articles/logging hoping I could find some tip, but to no avail.
What do I need to do to see my logs ?
Upvotes: 0
Views: 16
Reputation: 39389
Logging in Heroku logs to a “log stream”. By default, this is STDOUT
, so you can view logs in realtime using the Heroku CLI, as mentioned in the very docs page you linked to: https://devcenter.heroku.com/articles/logging#view-logs-with-the-heroku-cli
If you need to persist logs (i.e. errors), then you should use some sort of error tracker like Sentry.
Upvotes: 0