SGloria opened a new pull request, #10493:
URL: https://github.com/apache/rocketmq/pull/10493
## Summary
- Add debug-level logging to 4 empty `catch (Exception e)` blocks in
`StatsAllSubCommand.java`
- Include contextual information (topic name, consumer group, broker
address) in log messages
- Improve observability for the `mqadmin statsAll` command when partial
failures occur
## Motivation
When using `mqadmin statsAll`, if some brokers are temporarily unavailable
or return errors, exceptions are silently swallowed. Operators have no way to
know whether the output is complete or partially missing. By adding debug-level
logging, we preserve the existing behavior (no visible output change by
default) while enabling troubleshooting when needed.
## Changes
-
`tools/src/main/java/org/apache/rocketmq/tools/command/stats/StatsAllSubCommand.java`:
- Added `Logger` field using `LoggerFactory`
- Added `log.debug(...)` with exception details in all 4 previously empty
catch blocks
## Test Plan
- [x] Code compiles without errors
- [x] No behavioral change at default log level (INFO/WARN)
- [x] Debug-level logging provides useful diagnostic context when enabled
Fixes #10492
Made with [Cursor](https://cursor.com)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]