Skip to content

Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance

do not flush non-errors to stdout because this is a concurrency issue. the flush-call appeared very often in thread dumps with high load, so this hopefully gives some performances

Michael Peter Christen3cd7deb3b8ef
diff --git a/source/net/yacy/kelondro/logging/ConsoleOutErrHandler.java b/source/net/yacy/kelondro/logging/ConsoleOutErrHandler.java
index 2502c3553..9965686d1 100644
--- a/source/net/yacy/kelondro/logging/ConsoleOutErrHandler.java
+++ b/source/net/yacy/kelondro/logging/ConsoleOutErrHandler.java
@@ -138,11 +138,12 @@ public final class ConsoleOutErrHandler extends Handler {
}
if (record.getLevel().intValue() >= this.splitLevel.intValue()) {
+ this.stdOutHandler.publish(record);
+ this.stdOutHandler.flush();
this.stdErrHandler.publish(record);
this.stdErrHandler.flush();
} else {
this.stdOutHandler.publish(record);
- this.stdOutHandler.flush();
}
}