I have a nodejs repo on github and I have it connected with Heroku with the auto dpeloy option. Then when I push to master it will be deploy to Heroku server also. My question is how can I see the logs of my application? I can only find the build logs.
If it is a Heroku repo then I can do a Heroku logs
but now I only have my git repo.
Thanks!
You can view logs with the Heroku CLI, the dashboard, your logging add-on, or in your log drain. You can't view logs for apps in Shield spaces with Private Space Logging enabled. Retrieve logs from your log drain instead.
Terminal access is now provided by clicking a link "More" on the top right of the Heroku dashboard where you can select "run console". This presents an option to run terminal commands and shows a default of 'bash'. However, you do have to explicitly enter 'bash' or other command.
You can configure GitHub integration in the Deploy tab of apps in the Heroku Dashboard. To configure GitHub integration, you have to authenticate with GitHub. You only have to do this once per Heroku account. GitHub repo admin access is required for you to configure automatic GitHub deploys.
To deploy your app to Heroku, use the git push command to push the code from your local repository's main branch to your heroku remote. For example: $ git push heroku main Initializing repository, done.
Another method of viewing logs that might be more convenient is:
Go to Heroku app page (e.g. dashboard.heroku.com/apps/myAppName)
Click on "more" at the top right of the page
Click on "view logs" at the top of this menu
This enables you to view the app's logs on the Heroku online GUI, without needing to install the Heroku CLI.
You have probably enabled GitHub integration on your Heroku app. You still have a Heroku app right - that's what you enabled the GitHub integration on. If your app's name is foo-bar-123
then heroku logs -a foo-bar-123
should do it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With