Search code examples
node.jsforever

How to clean foreverjs logs for running processes?


How do I clean logs for foreverjs for a running process? I can manually delete the log files but that results in forever not logging anymore.

I've also seen cleanlogs but that only removes historical logs, but not affecting logs of any active processes.


Solution

  • If Linux, may be some like this help:

    for i in /var/forever/path/to/log/*; do cat /dev/null > $i; done