Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
### 警告:由于只是为了测试,此功能未完善,只为有需要的可以提前先拉下来用
目前实现的是在脚本运行的情况下自动检测日期,自动创建新日期对应的日志文件,且自动删除N(N默认为7)天前的日志文件,不处理error下的文件,因为这个最好自己删或者添加规则。
注意,目前这个功能一旦拉取强制开启,没有ui开关和config,以后有时间我再慢慢完善
目前已知可能的bug:
所以由于oas的多线程,在删除命令启动的时候若删除天数小于2天,可能有脚本正在被删文件中写入,导致错误,目前建议自动删除的天数N至少设置为3天,以后有空我再更新2. 我没加多线程锁,可能导致切换过程漏一行日志目前没有已知bug了,可以拉下来测试一下