Search code examples
node.jsforever

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?


Solution

  • 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