removed synchronization in logging that causes deadlocks in high-performance environments

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@6044 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
orbiter 16 years ago
parent db3a06dd81
commit 398e210fef

@ -150,7 +150,7 @@ public final class ConsoleOutErrHandler extends Handler {
this.stdErrHandler.close();
}
public synchronized void setLevel(final Level newLevel) throws SecurityException {
public void setLevel(final Level newLevel) throws SecurityException {
super.setLevel(newLevel);
}

@ -30,7 +30,7 @@ import java.util.logging.LogRecord;
import java.util.logging.SimpleFormatter;
import java.util.logging.StreamHandler;
public final class ConsoleOutHandler extends StreamHandler{
public final class ConsoleOutHandler extends StreamHandler {
public ConsoleOutHandler() {
setLevel(Level.FINEST);
@ -38,12 +38,12 @@ public final class ConsoleOutHandler extends StreamHandler{
setOutputStream(System.out);
}
public synchronized void publish(final LogRecord record) {
public void publish(final LogRecord record) {
super.publish(record);
flush();
}
public synchronized void close() {
public void close() {
flush();
}
}

@ -116,7 +116,7 @@ public class GuiHandler extends Handler {
return this.size;
}
public synchronized void publish(final LogRecord record) {
public void publish(final LogRecord record) {
if (!isLoggable(record)) return;
// write it to the buffer

@ -36,17 +36,15 @@ public final class MiniLogFormatter extends SimpleFormatter {
super();
}
public synchronized String format(final LogRecord record) {
public String format(final LogRecord record) {
final StringBuilder buffer = this.buffer;
buffer.setLength(0);
buffer.append(formatMessage(record));
// adding the stack trace if available
buffer.append(System.getProperty("line.separator"));
return buffer.toString();
}
}

@ -51,7 +51,7 @@ public class SimpleLogFormatter extends SimpleFormatter {
super();
}
public synchronized String format(final LogRecord record) {
public String format(final LogRecord record) {
final StringBuffer buffer = this.buffer;
buffer.setLength(0);

Loading…
Cancel
Save