简体   繁体   English

永远的node.js,如何设置永远的调试日志的限制文件大小

[英]node.js forever, how can I set the limit file-size of forver debug log

I run node.js forever with option to log output debug -d and -l options. 我使用选项永久运行node.js来记录输出debug -d和-l选项。 I known forever use winston for logging. 我知道永远使用Winston进行日志记录。 How can I limit the file size of the LOGFILE (pass option maxsize and maxFiles to winston) without modifying forever.js. 我如何在不修改forever.js的情况下限制LOGFILE的文件大小(将选项maxsize和maxFiles传递给winston)。 Is there forever already have this feature? 永远不会有此功能吗?

Thank you. 谢谢。

There's no such option unfortunately. 不幸的是,没有这样的选择。 Also I don't think it would be optimal to do so, imagine something checking the file size after each log or after a number of seconds. 我也不认为这样做是最佳的,想象一下在每次日志之后或几秒钟后检查文件大小的事情。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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