Running my Node application with Forever does not log any output

I am running a node project using Forever on an Amazon CentOS EC2 instance using the following command:

forever start -o /home/ec2-user/logs/www.log -e /home/ec2-user/logs/www.err app.js 

My application works correctly, but there are no www.log or www.err files created in the log directory. I tried to manually create these files and install chmod 777, and yet, there is no data recorded in these files. I am sure it is necessary to record data; I run the same project in a similar environment, and everything registers in order. Any help is appreciated!

+7
source share
1 answer

I think that one of the latest releases of node has undergone drastic changes. Someone recently submitted a related question to GitHub: https://github.com/nodejitsu/forever/issues/193

Unfortunately, Forever seems to display child process error messages in stdout, so stderr redirecting to a file does not work. A temporary solution would be to use an older version of node. I hope the fix comes out soon.

+1
source

All Articles