#3251·arthas

fix: replace printStackTrace with proper logging

Author: lxcxjxhxCreated Jul 31, 2026Updated Aug 26, 2026

Problem

Found 2 active e.printStackTrace() calls in core code:

  1. Arthas.java:167 - in main() method
  2. ArthasBanner.java:81 - in logo loading

Impact

  • Stack traces go directly to stderr instead of through the configured logging system
  • Cannot control log level, format, or output destination
  • Inconsistent with the rest of the codebase which uses AnsiLog and logger

Fix

  • Arthas.java: Replace t.printStackTrace() with AnsiLog.error(t)
  • ArthasBanner.java: Replace e.printStackTrace() with logger.warn(Failed to load logo, e)

Local environment limitations, relying on CI/CD automated testing.