Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to turn forever (nodejs) logs off

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?

like image 777
alias51 Avatar asked Sep 05 '25 03:09

alias51


1 Answers

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
like image 185
Paul Mougel Avatar answered Sep 07 '25 20:09

Paul Mougel