Skip to content

Commit

Permalink
fix 兼容 log.autoBackConsoleCron: none 配置属性
Browse files Browse the repository at this point in the history
  • Loading branch information
bwcx-jzy committed Jul 26, 2022
1 parent 8e1b054 commit 88fa256
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
2. 【server】触发器 token 机制调整,取消 SHA256 生成。采用数据表单独存储
3. 【server】修复启动加载全局代理时机,避免(The database is not initialized)
4. 管理脚本执行支持环境变量配置 jvm、端口等,`JPOM_AGENT_JVM`,`JPOM_AGENT_PORT`,`JPOM_AGENT_ARGS``JPOM_SERVER_JVM`,`JPOM_SERVER_PORT`,`JPOM_SERVER_ARGS` ( 感谢@飞儿 )
5. 【agent】兼容 `log.autoBackConsoleCron: none` 配置属性

------

Expand Down Expand Up @@ -54,6 +55,10 @@
4. 【server】修复编辑构建仓库切换事件重复问题 (感谢[@五六](https://gitee.com/tutu-father) [Gitee issues I5F35E](https://gitee.com/dromara/Jpom/issues/I5F35E)
5. 【server】修复 windows 执行脚本出现异常(感谢[@all-around-badass](https://gitee.com/all-around-badass) [Gitee issues I5FK0K](https://gitee.com/dromara/Jpom/issues/I5FK0K)

### ❌ 不兼容事项

1. 插件端 `log.autoBackConsoleCron` 配置属性替换为:`log.autoBackToFile`

------

## 2.9.2 (2022-06-27)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,13 @@ public int getLogSaveDays() {
* @return 如果表达式配置为none 则不配置,重启也不备份
*/
public boolean openLogBack() {
return Optional.ofNullable(autoBackToFile).orElse(true);
boolean newConfig = Optional.ofNullable(autoBackToFile).orElse(true);
if (newConfig) {
// 使用旧配置
String cron = StrUtil.emptyToDefault(autoBackConsoleCron, "none");
return !"none".equalsIgnoreCase(cron.trim());
}
return false;
// if(autoBackToFile==null || autoBackToFile){
// return
// }
Expand Down

0 comments on commit 88fa256

Please sign in to comment.