midwayjs / logger

midway logger
MIT License
4 stars 3 forks source link

fix: support maxSize set null and deal with ENOENT error issue when rotated in pm2 cluster mode #68

Closed joyexpr closed 2 years ago

joyexpr commented 2 years ago

1、支持maxSize设置为null,即不开启按大小轮转 2、防止pm2开启多实例时,当日志轮转并被压缩时,原日志文件被删除后,导致部分实例stat原日志文件抛出异常 3、按标准prettier部分代码格式

codecov-commenter commented 2 years ago

Codecov Report

Merging #68 (c7df4bc) into main (d2977ce) will decrease coverage by 0.15%. The diff coverage is 83.33%.

@@            Coverage Diff             @@
##             main      #68      +/-   ##
==========================================
- Coverage   84.79%   84.64%   -0.16%     
==========================================
  Files          13       13              
  Lines         921      925       +4     
  Branches      276      271       -5     
==========================================
+ Hits          781      783       +2     
- Misses        128      130       +2     
  Partials       12       12              
Impacted Files Coverage Δ
src/transport/fileStreamRotator.ts 83.93% <80.00%> (-0.07%) :arrow_down:
src/logger/logger.ts 95.16% <87.50%> (-0.51%) :arrow_down:

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.