I just discovered that my nodejs app keeps crashing, so I've used forever app.js
to start my app and have it automatically restarted when it crashes.
Problem: Now my app outputs alot of useful information as it runs via console.log
and util.log
. I used to use screen
to run the node app, but now that I'm using forever to run the nodejs app, I can no longer see all the outputs.
Is there any way to see all the output from the nodejs app in realtime?
You can watch a logfile live by using this shell-command.
tail -f /path/to/logfile
Not sure if this is what you needed.
Directly with forever command :
forever logs app.js -f
It shows in realtime output of your application and forever logs (shows detected changes & restart messages).