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

egg-logratator 如何禁止默认的日志切割 #4222

Open
NickNameWolf opened this issue Mar 16, 2020 · 3 comments
Open

egg-logratator 如何禁止默认的日志切割 #4222

NickNameWolf opened this issue Mar 16, 2020 · 3 comments

Comments

@NickNameWolf
Copy link

我通过扩展实现了自己想要的日志切割格式,但是egg-logrotator默认的按天切割还是会执行,如何禁止掉

@atian25
Copy link
Member

atian25 commented Mar 16, 2020

目前看来是不支持 https://github.com/eggjs/egg-logrotator/blob/master/app/lib/day_rotator.js#L65

你自己实现的切割诉求是怎么样的?切割时机有变化么?还是只是文件名格式问题?

@NickNameWolf
Copy link
Author

目前看来是不支持 https://github.com/eggjs/egg-logrotator/blob/master/app/lib/day_rotator.js#L65

你自己实现的切割诉求是怎么样的?切割时机有变化么?还是只是文件名格式问题?

我需要切割时机还有文件名,包括切割之后文件放置路径都有变化,我尝试了自己定义了LogRotator 但是发现切割日志的时候默认的按天切割还是会执行.

@nightink
Copy link
Contributor

增加一个新配置 来关闭默认的切割 就好了

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

No branches or pull requests

5 participants