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

allow logRotateAge option to be set to 0 #1049

Merged
merged 2 commits into from
Aug 9, 2022
Merged

Conversation

kkf1
Copy link
Contributor

@kkf1 kkf1 commented Aug 9, 2022

此次变更将提供设置日志文件不老化的选项,也即LogRotateAge=0
以前情况:不设置老化天数LogRotateAge或者设置LogRotateAge=0,系统将默认设置LogRotateAge=1,也即老化天数默认为1天

@tianxiaoliang
Copy link
Member

请描述场景

@tianxiaoliang
Copy link
Member

tianxiaoliang commented Aug 9, 2022

改成不老化,会导致这次变更后,磁盘逐渐写满,属于不兼容变更

@@ -105,7 +105,7 @@ func checkPassLagerDefinition(option *Options) {
option.LoggerFile = "log/chassis.log"
}

if option.LogRotateAge <= 0 || option.LogRotateAge > 10 {
if option.LogRotateAge < 0 || option.LogRotateAge > 10 {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

仅仅需要改108行,不应该改15行

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@tianxiaoliang tianxiaoliang changed the title log files don't get aged by default breaking changelog files don't get aged by default Aug 9, 2022
@tianxiaoliang tianxiaoliang changed the title breaking changelog files don't get aged by default breaking change: log files don't get aged by default Aug 9, 2022
@tianxiaoliang tianxiaoliang changed the title breaking change: log files don't get aged by default log files don't get aged by default Aug 9, 2022
@kkf1 kkf1 changed the title log files don't get aged by default provide option for log files not geting aged Aug 9, 2022
@kkf1 kkf1 changed the title provide option for log files not geting aged allow logRotateAge option to be set to 0 Aug 9, 2022
@tianxiaoliang tianxiaoliang merged commit 11608c9 into go-chassis:master Aug 9, 2022
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.

None yet

3 participants