Heroku and PhpStorm: view production logs inside the IDE
In this article I will share with you a simple way of viewing logs of a Heroku dyno, without leaving PhpStorm.
First, how to see real-time logs of our dyno? We need to run the following command:
heroku logs --tail
Regard that this is only one of the available possibilities. In the official documentation that addresses logging you have several examples.
Next I’ve created a bash script executable file in the path: bin/logs/prod.sh. To make this file executable just run:
chmod +x bin/logs/prod.sh
Now, in PhpStorm, right-click in the file, and choose Run.
What will happen is that the bash will be executed, showing all the logs in a specific window, inside the IDE.
What did you think?
Did you find this way of seeing logs inside the IDE practical? Leave me your opinion, with a comment. I would like to know.