cleanup spaces

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@617 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
borg-0300 20 years ago
parent 3563552bd3
commit fa54b5f38d

@ -50,15 +50,15 @@ import java.util.logging.Logger;
public final class serverLog {
// // log-level categories
// log-level categories
public static final int LOGLEVEL_ZERO = Level.OFF.intValue(); // no output at all
public static final int LOGLEVEL_SEVERE = Level.SEVERE.intValue(); // system-level error, internal cause, critical and not fixeable (i.e. inconsistency)
public static final int LOGLEVEL_WARNING = Level.WARNING.intValue(); // uncritical service failure, may require user activity (i.e. input required, wrong authorization)
public static final int LOGLEVEL_CONFIG = Level.CONFIG.intValue(); // regular system status information (i.e. start-up messages)
public static final int LOGLEVEL_INFO = Level.INFO.intValue(); // regular action information (i.e. any httpd request URL)
public static final int LOGLEVEL_FINE = Level.FINE.intValue(); // in-function status debug output
//
// // these categories are also present as character tokens
// these categories are also present as character tokens
public static final char LOGTOKEN_ZERO = 'Z';
public static final char LOGTOKEN_SEVERE = 'E';
public static final char LOGTOKEN_WARNING = 'W';
@ -92,54 +92,44 @@ public final class serverLog {
public void logFine(String message) {this.theLogger.fine(message);}
public void logFine(String message, Throwable thrown) {this.theLogger.log(Level.FINE,message,thrown);}
// static log messages: log everything
private static void log(String appName, int messageLevel, String message) {
Logger.getLogger(appName).log(Level.parse(Integer.toString(messageLevel)),message);
}
private void log(Level level, String msg, Throwable thrown) {
this.theLogger.log(level, msg, thrown);
}
public static void logSevere(String appName, String message) {
Logger.getLogger(appName).severe(message);
}
public static void logSevere(String appName, String message, Throwable thrown) {
Logger.getLogger(appName).log(Level.SEVERE,message,thrown);
}
public static void logWarning(String appName, String message) {
Logger.getLogger(appName).warning(message);
}
public static void logWarning(String appName, String message, Throwable thrown) {
Logger.getLogger(appName).log(Level.WARNING,message,thrown);
}
public static void logConfig(String appName, String message) {
Logger.getLogger(appName).config(message);
}
public static void logConfig(String appName, String message, Throwable thrown) {
Logger.getLogger(appName).log(Level.CONFIG,message,thrown);
}
public static void logInfo(String appName, String message) {
Logger.getLogger(appName).info(message);
}
public static void logInfo(String appName, String message, Throwable thrown) {
Logger.getLogger(appName).log(Level.INFO,message,thrown);
}
public static void logFine(String appName, String message) {
Logger.getLogger(appName).finest(message);
}
public static void logFine(String appName, String message, Throwable thrown) {
Logger.getLogger(appName).log(Level.FINEST,message,thrown);
}
public static final void configureLogging(File loggingConfigFile) throws SecurityException, FileNotFoundException, IOException {
FileInputStream fileIn = null;
try {
System.out.println("STARTUP: Trying to load logging configuration from file " + loggingConfigFile.toString());
@ -156,7 +146,6 @@ public final class serverLog {
// generating the root logger
Logger logger = Logger.getLogger("");
// System.setOut(new PrintStream(new LoggerOutputStream(Logger.getLogger("STDOUT"),Level.FINEST)));
// System.setErr(new PrintStream(new LoggerOutputStream(Logger.getLogger("STDERR"),Level.SEVERE)));
} finally {

Loading…
Cancel
Save