From 3cd7deb3b8ef0ee7a52cdfc006de86acbfb3e3ef Mon Sep 17 00:00:00 2001 From: Michael Peter Christen Date: Sun, 28 Dec 2014 15:48:37 +0100 Subject: [PATCH] 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 --- source/net/yacy/kelondro/logging/ConsoleOutErrHandler.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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(); } }