I'm looking into some issues I'm having with my Heroku Review Apps.
It appears that from Bash, there's no way to access the config (environment variables) or logging. If I run:
heroku logs --tail
This just comes back with logs from the production app (which makes sense, since there doesn't seem to be a way to keep the scope at the review app). I can see the Review App logs from within the Heroku dashboard, but even this seems a bit off, as subsequent refreshes will omit different lines from the log (which is why I'm trying to just see them from Bash).
Also, if I do:
heroku config
It returns back the expected config values (i.e. DATABASE_URL
), but again, I'm not sure if this is just for production.
For example, running this from the review app:
console.log("process.env.PORT: " + process.env.PORT);
console.log("process.env.DATABASE_URL: " + process.env.DATABASE_URL);
console.log("process.env.PAPERTRAIL_API_TOKEN: " + process.env.PAPERTRAIL_API_TOKEN);
The PORT
is returning a value, but both DATABASE_URL
AND PAPERTRAIL_API_TOKEN
are coming back undefined
, even though these are both populated in heroku config
.
So my questions are:
1) How do I view a Review App's logs from Bash (or any other reliable method other than the Heroku dashboard)?
2) Are the config values different between Review Apps and production, and if so, how do I configure them for Review Apps?