简体   繁体   中英

Clean up log files for failed Forever.js tasks

When trying to start a process using Forever.js and it fails, the process continues to appear in the forever list output as stopped . In this screenshot, this the case with all 4 stopped processes:

在此处输入图片说明

What's the right way to remove those? Should I use the cleanlogs command? What if I want to preserve the log files but just remove those processes from the output of forever list ?

Base on my tests, it looks like this is the rule:

  • If a task exit on exception, it will be marked as "STOPPED" and kept in forever list .
  • You can use forever stop xxx to remove a STOPPED task from forever list .
  • With forever stop xxx , the corresponding log will be cleared too. So if you want to keep the error log, move it somewhere else before forever stop xxx .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM