*) adding more SVN properties

*) minor changes

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@6542 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
low012 15 years ago
parent 82d740050f
commit 028657f019

@ -6,8 +6,8 @@
//Frankfurt, Germany, 2004
//
//This file ist contributed by Martin Thelian
//last major change: $LastChangedDate: 2008-08-02 14:12:04 +0200 (Sa, 02 Aug 2008) $ by $LastChangedBy: danielr $
//Revision: $LastChangedRevision: 5030 $
//last major change: $LastChangedDate: 2008-08-02 14:12:04 +0200 (Sa, 02 Aug 2008) $ by $LastChangedBy$
//Revision: $LastChangedRevision$
//
//This program is free software; you can redistribute it and/or modify
//it under the terms of the GNU General Public License as published by
@ -150,6 +150,7 @@ public final class ConsoleOutErrHandler extends Handler {
this.stdErrHandler.close();
}
@Override
public synchronized void setLevel(final Level newLevel) throws SecurityException {
super.setLevel(newLevel);
}
@ -160,6 +161,7 @@ public final class ConsoleOutErrHandler extends Handler {
this.stdErrHandler.setLevel(stdErrLevel);
}
@Override
public void setFormatter(final Formatter newFormatter) throws SecurityException {
super.setFormatter(newFormatter);
if (newFormatter == null) return;
@ -171,6 +173,7 @@ public final class ConsoleOutErrHandler extends Handler {
}
}
@Override
public final void setFilter(final Filter newFilter) throws SecurityException {
super.setFilter(newFilter);
if (newFilter == null) return;

@ -6,8 +6,8 @@
//Frankfurt, Germany, 2004
//
//This file ist contributed by Martin Thelian
//last major change: $LastChangedDate: 2008-08-02 14:12:04 +0200 (Sa, 02 Aug 2008) $ by $LastChangedBy: danielr $
//Revision: $LastChangedRevision: 5030 $
//last major change: $LastChangedDate: 2008-08-02 14:12:04 +0200 (Sa, 02 Aug 2008) $ by $LastChangedBy$
//Revision: $LastChangedRevision$
//
//This program is free software; you can redistribute it and/or modify
//it under the terms of the GNU General Public License as published by
@ -38,11 +38,13 @@ public final class ConsoleOutHandler extends StreamHandler {
setOutputStream(System.out);
}
@Override
public final synchronized void publish(final LogRecord record) {
super.publish(record);
flush();
}
@Override
public final synchronized void close() {
flush();
}

@ -6,7 +6,7 @@
//Frankfurt, Germany, 2004
//
//This file ist contributed by Martin Thelian
//last major change: $LastChangedDate$ by $LastChangedBy$
//last major change: $LastChangedDate: 2009-10-12 23:59:39 +0200 (Mo, 12. Okt 2009) $ by $LastChangedBy$
//Revision: $LastChangedRevision$
//
//This program is free software; you can redistribute it and/or modify

@ -3,8 +3,8 @@
// (C) by Michael Peter Christen; mc@yacy.net
// first published on http://www.anomic.de
// Frankfurt, Germany, 2004
// last major change: $LastChangedDate: 2009-01-30 14:48:11 +0000 (Fr, 30 Jan 2009) $ by $LastChangedBy: orbiter $
// Revision: $LastChangedRevision: 5539 $
// last major change: $LastChangedDate: 2009-01-30 14:48:11 +0000 (Fr, 30 Jan 2009) $ by $LastChangedBy$
// Revision: $LastChangedRevision$
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@ -213,7 +213,7 @@ public final class Log {
return Logger.getLogger(appName).isLoggable(Level.FINEST);
}
private final static void enQueueLog(Logger logger, Level level, String message, final Throwable thrown) {
private final static void enQueueLog(final Logger logger, final Level level, final String message, final Throwable thrown) {
if (logRunnerThread == null || !logRunnerThread.isAlive()) {
logger.log(level, message, thrown);
} else {
@ -225,7 +225,7 @@ public final class Log {
}
}
private final static void enQueueLog(Logger logger, Level level, String message) {
private final static void enQueueLog(final Logger logger, final Level level, final String message) {
if (logRunnerThread == null || !logRunnerThread.isAlive()) {
logger.log(level, message);
} else {
@ -237,7 +237,7 @@ public final class Log {
}
}
private final static void enQueueLog(String loggername, Level level, String message, final Throwable thrown) {
private final static void enQueueLog(final String loggername, final Level level, final String message, final Throwable thrown) {
if (logRunnerThread == null || !logRunnerThread.isAlive()) {
Logger.getLogger(loggername).log(level, message, thrown);
} else {
@ -249,7 +249,7 @@ public final class Log {
}
}
private final static void enQueueLog(String loggername, Level level, String message) {
private final static void enQueueLog(final String loggername, final Level level, final String message) {
if (logRunnerThread == null || !logRunnerThread.isAlive()) {
Logger.getLogger(loggername).log(level, message);
} else {
@ -267,28 +267,28 @@ public final class Log {
public final Level level;
public final String message;
public final Throwable thrown;
public logEntry(Logger logger, Level level, String message, final Throwable thrown) {
public logEntry(final Logger logger, final Level level, final String message, final Throwable thrown) {
this.logger = logger;
this.loggername = null;
this.level = level;
this.message = message;
this.thrown = thrown;
}
public logEntry(Logger logger, Level level, String message) {
public logEntry(final Logger logger, final Level level, final String message) {
this.logger = logger;
this.loggername = null;
this.level = level;
this.message = message;
this.thrown = null;
}
public logEntry(String loggername, Level level, String message, final Throwable thrown) {
public logEntry(final String loggername, final Level level, final String message, final Throwable thrown) {
this.logger = null;
this.loggername = loggername;
this.level = level;
this.message = message;
this.thrown = thrown;
}
public logEntry(String loggername, Level level, String message) {
public logEntry(final String loggername, final Level level, final String message) {
this.logger = null;
this.loggername = loggername;
this.level = level;
@ -313,6 +313,7 @@ public final class Log {
super("Log Runner");
}
@Override
public void run() {
logEntry entry;
try {

@ -6,8 +6,8 @@
//Frankfurt, Germany, 2004
//
//This file ist contributed by Matthias Soehnholz
//last major change: $LastChangedDate: 2008-11-17 16:23:17 +0000 (Mo, 17 Nov 2008) $ by $LastChangedBy: lotus $
//Revision: $LastChangedRevision: 5349 $
//last major change: $LastChangedDate: 2008-11-17 16:23:17 +0000 (Mo, 17 Nov 2008) $ by $LastChangedBy$
//Revision: $LastChangedRevision$
//
//This program is free software; you can redistribute it and/or modify
//it under the terms of the GNU General Public License as published by

@ -6,7 +6,7 @@
//Frankfurt, Germany, 2004
//
//This file ist contributed by Matthias Soehnholz
//last major change: $LastChangedDate$ by $LastChangedBy$
//last major change: $LastChangedDate: 2009-10-12 23:59:39 +0200 (Mo, 12. Okt 2009) $ by $LastChangedBy$
//Revision: $LastChangedRevision$
//
//This program is free software; you can redistribute it and/or modify
@ -33,8 +33,8 @@ import java.util.logging.LogRecord;
public final class LogalizerHandler extends Handler {
public static boolean enabled=false;
public static boolean debug=false;
public static boolean enabled = false;
public static boolean debug = false;
public LogalizerHandler() {
super();

@ -6,8 +6,8 @@
//Frankfurt, Germany, 2004
//
//This file ist contributed by Martin Thelian
//last major change: $LastChangedDate: 2008-12-04 13:54:16 +0100 (Thu, 04 Dec 2008) $ by $LastChangedBy: orbiter $
//Revision: $LastChangedRevision: 5379 $
//last major change: $LastChangedDate: 2008-12-04 13:54:16 +0100 (Thu, 04 Dec 2008) $ by $LastChangedBy$
//Revision: $LastChangedRevision$
//
//This program is free software; you can redistribute it and/or modify
//it under the terms of the GNU General Public License as published by
@ -36,15 +36,16 @@ public final class MiniLogFormatter extends SimpleFormatter {
super();
}
@Override
public final synchronized String format(final LogRecord record) {
final StringBuilder buffer = this.buffer;
buffer.setLength(0);
buffer.append(formatMessage(record));
final StringBuilder stringBuilder = this.buffer;
stringBuilder.setLength(0);
stringBuilder.append(formatMessage(record));
// adding the stack trace if available
buffer.append(System.getProperty("line.separator"));
stringBuilder.append(System.getProperty("line.separator"));
return buffer.toString();
return stringBuilder.toString();
}
}

@ -6,8 +6,8 @@
//Frankfurt, Germany, 2004
//
//This file is contributed by Martin Thelian
//last major change: $LastChangedDate: 2008-08-02 14:12:04 +0200 (Sat, 02 Aug 2008) $ by $LastChangedBy: danielr $
//Revision: $LastChangedRevision: 5030 $
//last major change: $LastChangedDate: 2008-08-02 14:12:04 +0200 (Sat, 02 Aug 2008) $ by $LastChangedBy$
//Revision: $LastChangedRevision$
//
//This program is free software; you can redistribute it and/or modify
//it under the terms of the GNU General Public License as published by
@ -50,10 +50,11 @@ public final class SimpleLogFormatter extends SimpleFormatter {
super();
}
@Override
public final synchronized String format(final LogRecord record) {
final StringBuffer buffer = this.buffer;
buffer.setLength(0);
final StringBuffer stringBuffer = this.buffer;
stringBuffer.setLength(0);
// adding the loglevel
final int logLevel = record.getLevel().intValue();
@ -81,28 +82,28 @@ public final class SimpleLogFormatter extends SimpleFormatter {
this.formatter.format(this.date, this.buffer, this.position);
// adding the logger name
buffer.append(' ');
buffer.append(record.getLoggerName());
stringBuffer.append(' ');
stringBuffer.append(record.getLoggerName());
// adding the logging message
buffer.append(' ');
buffer.append(formatMessage(record));
stringBuffer.append(' ');
stringBuffer.append(formatMessage(record));
// adding the stack trace if available
buffer.append(System.getProperty("line.separator"));
stringBuffer.append(System.getProperty("line.separator"));
if (record.getThrown() != null) {
StringWriter writer = null;
try {
writer = new StringWriter();
final PrintWriter printer = new PrintWriter(writer);
record.getThrown().printStackTrace(printer);
buffer.append(writer.toString());
stringBuffer.append(writer.toString());
} catch (final Exception e) {
buffer.append("Failed to get stack trace: " + e.getMessage());
stringBuffer.append("Failed to get stack trace: " + e.getMessage());
} finally {
if (writer != null) try {writer.close();} catch (final Exception ex) {}
}
}
return buffer.toString();
return stringBuffer.toString();
}
}

Loading…
Cancel
Save