You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@helix.apache.org by GitBox <gi...@apache.org> on 2020/10/26 17:07:08 UTC
[GitHub] [helix] kaisun2000 commented on a change in pull request #1483: Replace the system.out.printlns in the ThreadLeakageChecker with debug log or error log to avoid verbose output.
kaisun2000 commented on a change in pull request #1483:
URL: https://github.com/apache/helix/pull/1483#discussion_r512126947
##########
File path: helix-core/src/test/java/org/apache/helix/ThreadLeakageChecker.java
##########
@@ -189,26 +193,26 @@ public static boolean afterClassCheck(String classname) {
boolean dumpThread = false;
if (categoryThreadCnt > limit) {
checkStatus = false;
- System.out.println(
+ LOG.info(
"Failure " + threadCategory.getDescription() + " has " + categoryThreadCnt + " thread");
dumpThread = true;
} else if (categoryThreadCnt > warningLimit) {
- System.out.println(
+ LOG.info(
"Warning " + threadCategory.getDescription() + " has " + categoryThreadCnt + " thread");
dumpThread = true;
} else {
- System.out.println(threadCategory.getDescription() + " has " + categoryThreadCnt + " thread");
+ LOG.info(threadCategory.getDescription() + " has " + categoryThreadCnt + " thread");
}
if (!dumpThread) {
continue;
}
// print first 100 thread names
int i = 0;
for (Thread t : threadByCat.get(threadCategory)) {
- System.out.println(i + " thread:" + t.getName());
+ LOG.debug(i + " thread:" + t.getName());
Review comment:
Nit: LOG.info may be better. Otherwise, it is hard for people using it to see the leaked thread if they wish as they need to turn on debug. which can result in a lot more other lines.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@helix.apache.org
For additional commands, e-mail: reviews-help@helix.apache.org