Skip to content

fix: replace printStackTrace with RecordLog in ConfigUtil #3637

Description

@lxcxjxhx

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions