fix: replace printStackTrace with RecordLog in ConfigUtil
- Dominant language
- Java
- Stars
- 23.1k
- Forks
- 8.1k
- PR merge metrics
- No merged PRs in 30d
Description
## 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.
Contributor guide
Research direction
Start in ConfigUtil.java at the three e.printStackTrace() calls on lines 80, 107, and 122, and compare nearby uses of RecordLog. Replace them with contextual RecordLog.warn() calls including the file name or URL being loaded. Run the project's automated CI tests to verify the logging changes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 76/100