fix: replace printStackTrace with RecordLog in ConfigUtil
评估
调研方向
从 ConfigUtil.java 中第 80、107 和 122 行的三个 e.printStackTrace() 调用开始,并对比附近对 RecordLog 的使用。将它们替换为包含正在加载的文件名或 URL 的上下文 RecordLog.warn() 调用。运行项目的自动化 CI 测试,以验证日志记录更改。
由索引模型根据 Issue 内容生成。
描述
Problem
ConfigUtil.java uses e.printStackTrace() in 3 places (lines 80, 107, 122) for error handling, which bypasses Sentinel's logging framework (RecordLog).
Impact
- Stack traces go directly to stderr instead of through the configured logging system
- Cannot control log level, format, or output destination for these errors
- Inconsistent with the rest of the codebase which uses RecordLog
Fix
Replace all 3 occurrences of e.printStackTrace() with RecordLog.warn() calls that include contextual information (file name or URL being loaded).
Local environment limitations, relying on CI/CD automated testing.
- 主要语言
- Java
- 星标
- 23.1k
- 派生
- 8.1k
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
alibaba/Sentinel 的其他 Issue
-
[BUG] sentinel-spring-webflux-adapter 在 Spring WebFlux 6.2.x 下触发限流时抛出 NoSuchMethodError可能已有人在做 @amalsaidov 于 6 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 68/100
-
[BUG] sentinel-dashboard: upgrade Spring Boot 2.5.12 -> 2.5.15 for known CVEs可能已有人在做 @vendrov 于 29 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 62/100
-
[DOC] Correct method-name typo in WebMVC interceptor example可能已有人在做 @vietdungnguyen2005 于 18 天前认领。 未关闭
难度 1/5 1 小时以内 新手友好度 95/100
-
README: broken Keruyun (客如云) logo image link in "Who is using" section (404)可能已有人在做 @525600Cloud2 于 86 天前认领。 未关闭
难度 1/5 1 小时以内 新手友好度 92/100
-
难度 4/5 3-5 天 新手友好度 35/100
相似的 Issue
-
Add contributing guide可能已有人在做 @WadekarPrashant 今天认领。 未关闭good first issue
难度 1/5 1-3 小时 新手友好度 88/100
jenkinsci/gitea-checks-plugin#382 · 1 条评论 ·
-
enhancement infra
难度 2/5 1-3 小时 新手友好度 67/100
维护者通常 1 天内回复
-
5.0.x backport bug
难度 1/5 1 小时以内 新手友好度 68/100
spring-cloud/spring-cloud-function#1569 ·
维护者通常 1 天内回复
-
Move the spring-cloud-commons version and BOM import from the bus parent to the stream parent可能已有人在做 @olegz 今天认领。 未关闭task
难度 2/5 1-3 小时 新手友好度 74/100
spring-cloud/spring-cloud-stream#3355 ·
维护者通常 1 天内回复
-
bug untriaged
难度 2/5 1-3 小时 新手友好度 72/100
opensearch-project/opensearch-java#2342 ·
维护者通常 1 天内回复