Reputation: 8618
I am using forever (https://github.com/nodejitsu/forever) to run my nodejs application:
forever start app.js
However, it is creating HUGE log files. After 2 days, I have 8GB of logs. The logs are all stored in /home/.forever
Is it possible to turn of the logging feature from the command line, or should I edit my app somehow?
Upvotes: 4
Views: 3031
Reputation: 14729
Paul's answer did not work for me, but gave me some pointers on how to do it:
forever start -o /dev/null -l /dev/null -a script.js
From the documentation:
-l LOGFILE Logs the forever output to LOGFILE
-o OUTFILE Logs stdout from child script to OUTFILE
Depending on your process, you may also need to redirect STDERR:
-e ERRFILE Logs stderr from child script to ERRFILE
Upvotes: 4
Reputation: 17038
console.log()
writes to the standard output of your process (stdout
), so you can tell forever
to store the output of stdout
in /dev/null
:
$ forever -o /dev/null index.js
Upvotes: 4