Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add disableRotateByDay configuration(default:false) #28

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

qingdengyue
Copy link

Checklist
  • npm test passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines
Affected core subsystem(s)
Description of change

add disableRotateByDay configuration(default:false)

@qingdengyue
Copy link
Author

eggjs/egg#4222

@codecov
Copy link

codecov bot commented Sep 21, 2020

Codecov Report

Merging #28 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #28   +/-   ##
=======================================
  Coverage   96.19%   96.19%           
=======================================
  Files          14       14           
  Lines         210      210           
=======================================
  Hits          202      202           
  Misses          8        8           
Impacted Files Coverage Δ
app/schedule/rotate_by_file.js 100.00% <ø> (ø)
config/config.default.js 100.00% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 46b6876...bb436f9. Read the comment docs.

@atian25
Copy link
Member

atian25 commented Sep 23, 2020

这个的场景是?

@qingdengyue
Copy link
Author

这个的场景是?

eggjs/egg#4222 可以配置,禁用默认按天的日志切割。 @atian25

@atian25
Copy link
Member

atian25 commented Sep 23, 2020

印象中里面提到的应该是单个的禁用,即有其他策略时就不切文件,而不是全局禁用吧,明天看下

@qingdengyue
Copy link
Author

qingdengyue commented Sep 24, 2020

@atian25
1.目前,hour的分割方式,受filesRotateByHour配置项控制。size的分割方式,受filesRotateBySize控制。如果前两者都配置为空,则不会启用。file方式取的系统配置项,没有提供可以禁用的选项。可以采用类似方案,给day提供一个files的配置控制。这样与hour,size的方式一致
2.如果采用,用户自定义方式,且不存在1的配置。如果用户提供了自定义的方式,那么就禁用系统默认的。这样是不是就完全用户自定义了?我看自定义方式上传了app对象。就可以获取到所有的文件目录。用户完全自定义。用户自由度更高的一个方案。
Update:
#4222 里面,需求是:切割时间,文件名,存放目录,均自定义。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants