Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
*) Renaming Logger function names to reflect the proper Java Logging API Loglevels - please use logFine instead of logDebug - please use logFailure instead of logError See: http://www.yacy-forum.de/viewtopic.php?p=8726#8726
theli6adf8a4bde2c
diff --git a/htroot/ProxyIndexingMonitor_p.java b/htroot/ProxyIndexingMonitor_p.javaindex e2679c995..330b29660 100644--- a/htroot/ProxyIndexingMonitor_p.java+++ b/htroot/ProxyIndexingMonitor_p.java@@ -146,7 +146,7 @@ public class ProxyIndexingMonitor_p {} catch (Exception e) {prop.put("info", 2); //Error: errmsgprop.put("info_error", e.getMessage());- serverLog.logError("SERVLET", "ProxyIndexingMonitor.case3", e);+ serverLog.logFailure("SERVLET", "ProxyIndexingMonitor.case3", e);}}diff --git a/htroot/htdocsdefault/dir.java b/htroot/htdocsdefault/dir.javaindex 35f05e436..6c922addc 100644--- a/htroot/htdocsdefault/dir.java+++ b/htroot/htdocsdefault/dir.java@@ -477,7 +477,7 @@ public class dir {switchboard.removeReferences(urlhash, words);switchboard.urlPool.loadedURL.remove(urlhash);} catch (Exception e) {- serverLog.logError("DIR", "INTERNAL ERROR in dir.deletePhrase", e);+ serverLog.logFailure("DIR", "INTERNAL ERROR in dir.deletePhrase", e);}}}diff --git a/htroot/yacy/crawlReceipt.java b/htroot/yacy/crawlReceipt.javaindex 4ed70c0af..206966f83 100644--- a/htroot/yacy/crawlReceipt.java+++ b/htroot/yacy/crawlReceipt.java@@ -117,7 +117,7 @@ public class crawlReceipt {// write logplasmaCrawlLURL.Entry entry = switchboard.urlPool.loadedURL.getEntry(urlhash);if (entry == null) {- switchboard.getLog().logError("RECEIVED wrong RECEIPT for hash " + urlhash + " from peer " + iam);+ switchboard.getLog().logFailure("RECEIVED wrong RECEIPT for hash " + urlhash + " from peer " + iam);} else {switchboard.getLog().logInfo("RECEIVED RECEIPT for URL " + entry.url().toString());}diff --git a/htroot/yacy/search.java b/htroot/yacy/search.javaindex 86e5bb2ea..102554d1e 100644--- a/htroot/yacy/search.java+++ b/htroot/yacy/search.java@@ -77,7 +77,7 @@ public class search {boolean global = ((String) post.get("resource", "global")).equals("global"); // if true, then result may consist of answers from other peersDate remoteTime = yacyCore.parseUniversalDate((String) post.get("mytime")); // read remote timeif (yacyCore.seedDB == null) {- yacyCore.log.logError("yacy.search: seed cache not initialized");+ yacyCore.log.logFailure("yacy.search: seed cache not initialized");} else {yacyCore.peerActions.peerArrival(yacySeed.genRemoteSeed(oseed, key, remoteTime), true);}diff --git a/htroot/yacy/transferURL.java b/htroot/yacy/transferURL.javaindex bf903f95e..4cbaabbec 100644--- a/htroot/yacy/transferURL.java+++ b/htroot/yacy/transferURL.java@@ -84,18 +84,18 @@ public class transferURL {for (int i = 0; i < urlc; i++) {urls = (String) post.get("url" + i);if (urls == null) {- yacyCore.log.logDebug("transferURL: got null URL-string from peer " + iam);+ yacyCore.log.logFine("transferURL: got null URL-string from peer " + iam);} else {lEntry = switchboard.urlPool.loadedURL.newEntry(urls, true);if ((lEntry != null) && (blockBlacklist)) {if (switchboard.urlBlacklist.isListed(lEntry.url().getHost().toLowerCase(), lEntry.url().getPath())) {- yacyCore.log.logDebug("transferURL: blocked blacklisted URL '" + lEntry.url() + "' from peer " + iam);+ yacyCore.log.logFine("transferURL: blocked blacklisted URL '" + lEntry.url() + "' from peer " + iam);lEntry = null;}}if (lEntry != null) {switchboard.urlPool.loadedURL.addEntry(lEntry, iam, iam, 3);- yacyCore.log.logDebug("transferURL: received URL '" + lEntry.url() + "' from peer " + iam);+ yacyCore.log.logFine("transferURL: received URL '" + lEntry.url() + "' from peer " + iam);received++;}}@@ -107,7 +107,7 @@ public class transferURL {int more = switchboard.urlPool.loadedURL.size() - sizeBefore;doublevalues = Integer.toString(received - more);switchboard.getLog().logInfo("Received " + received + " URLs from peer " + iam);- if ((received - more) > 0) switchboard.getLog().logError("Received " + doublevalues + " double URLs from peer " + iam);+ if ((received - more) > 0) switchboard.getLog().logFailure("Received " + doublevalues + " double URLs from peer " + iam);result = "ok";} else {result = "error_not_granted";diff --git a/source/de/anomic/data/translator.java b/source/de/anomic/data/translator.javaindex a5d6cbe84..f5f172332 100644--- a/source/de/anomic/data/translator.java+++ b/source/de/anomic/data/translator.java@@ -170,7 +170,7 @@ public class translator {if(translateFile(sourceFiles[i], new File(destDir, sourceFiles[i].getName()), (Hashtable)translationLists.get(sourceFiles[i].getName()))){serverLog.logInfo("Translator", "Translated file: "+ sourceFiles[i].getName());}else{- serverLog.logError("Translator", "File error while translating file "+sourceFiles[i].getPath());+ serverLog.logFailure("Translator", "File error while translating file "+sourceFiles[i].getPath());}}else{serverLog.logInfo("Translator", "No translation for file: "+sourceFiles[i].getPath());diff --git a/source/de/anomic/http/httpHeader.java b/source/de/anomic/http/httpHeader.javaindex e78348e86..919d2d111 100644--- a/source/de/anomic/http/httpHeader.java+++ b/source/de/anomic/http/httpHeader.java@@ -323,11 +323,11 @@ public final class httpHeader extends TreeMap implements Map {return EMLFormatter.parse(s);} catch (java.text.ParseException e) {//System.out.println("ERROR long version parse: " + e.getMessage() + " at position " + e.getErrorOffset());- serverLog.logError("HTTPC-header", "DATE ERROR (Parse): " + s);+ serverLog.logFailure("HTTPC-header", "DATE ERROR (Parse): " + s);return new Date();} catch (java.lang.NumberFormatException e) {//System.out.println("ERROR long version parse: " + e.getMessage() + " at position " + e.getErrorOffset());- serverLog.logError("HTTPC-header", "DATE ERROR (NumberFormat): " + s);+ serverLog.logFailure("HTTPC-header", "DATE ERROR (NumberFormat): " + s);return new Date();}}diff --git a/source/de/anomic/http/httpTemplate.java b/source/de/anomic/http/httpTemplate.javaindex 56b4374f7..cdeb05d7c 100644--- a/source/de/anomic/http/httpTemplate.java+++ b/source/de/anomic/http/httpTemplate.java@@ -231,7 +231,7 @@ public final class httpTemplate {writeTemplate(pis2, out, pattern, dflt, multi_key + "_" + i + "_");}//for}else{//transferUntil- serverLog.logError("TEMPLATE", "No Close Key found for #{"+multi_key+"}#");+ serverLog.logFailure("TEMPLATE", "No Close Key found for #{"+multi_key+"}#");}}}else if( (bb & 0xFF) == lrbr ){ //alternatives@@ -275,7 +275,7 @@ public final class httpTemplate {//TODO: better Error HandlingtransferUntil(pis, keyStream, (new String("%%"+patternName)).getBytes());if(pis.available()==0){- serverLog.logError("TEMPLATE", "No such Template: %%"+patternName);+ serverLog.logFailure("TEMPLATE", "No such Template: %%"+patternName);return;}keyStream=new ByteArrayOutputStream();@@ -284,7 +284,7 @@ public final class httpTemplate {writeTemplate(pis2, out, pattern, dflt, prefix + key + "_");transferUntil(pis, keyStream, (new String("#(/"+key+")#")).getBytes());if(pis.available()==0){- serverLog.logError("TEMPLATE", "No Close Key found for #("+key+")# (by Name)");+ serverLog.logFailure("TEMPLATE", "No Close Key found for #("+key+")# (by Name)");}}else{while(!found){@@ -335,7 +335,7 @@ public final class httpTemplate {if(!found){text += (char)bb;if(pis.available()==0){- serverLog.logError("TEMPLATE", "No Close Key found for #("+key+")# (by Index)");+ serverLog.logFailure("TEMPLATE", "No Close Key found for #("+key+")# (by Index)");found=true;}}@@ -380,7 +380,7 @@ public final class httpTemplate {}}catch(IOException e){//file not found?- serverLog.logError("FILEHANDLER","Include Error with file: "+filename);+ serverLog.logFailure("FILEHANDLER","Include Error with file: "+filename);} finally {if (br!=null) try{br.close(); br=null;}catch(Exception e){}}diff --git a/source/de/anomic/http/httpc.java b/source/de/anomic/http/httpc.javaindex cf8e608d2..e0921a67d 100644--- a/source/de/anomic/http/httpc.java+++ b/source/de/anomic/http/httpc.java@@ -1281,8 +1281,8 @@ do uploadif (p > 0) {responseHeader.add(buffer.substring(0, p).trim(), buffer.substring(p + 1).trim());} else {- serverLog.logError("HTTPC", "RESPONSE PARSE ERROR: HOST='" + host + "', PATH='" + requestPath + "', STATUS='" + status + "'");- serverLog.logError("HTTPC", "..............BUFFER: " + buffer);+ serverLog.logFailure("HTTPC", "RESPONSE PARSE ERROR: HOST='" + host + "', PATH='" + requestPath + "', STATUS='" + status + "'");+ serverLog.logFailure("HTTPC", "..............BUFFER: " + buffer);}}}@@ -1331,7 +1331,7 @@ do uploadpublic byte[] writeContent() throws IOException {int contentLength = (int) this.responseHeader.contentLength();serverByteBuffer sbb = new serverByteBuffer((contentLength==-1)?8192:contentLength);- writeContentX(null, sbb, httpc.this.clientInput);+ writeContentX(null, sbb, clientInput);return sbb.getBytes();}@@ -1346,7 +1346,7 @@ do uploadpublic byte[] writeContent(OutputStream procOS) throws IOException {int contentLength = (int) this.responseHeader.contentLength();serverByteBuffer sbb = new serverByteBuffer((contentLength==-1)?8192:contentLength);- writeContentX(procOS, sbb, httpc.this.clientInput);+ writeContentX(procOS, sbb, clientInput);return sbb.getBytes();}@@ -1364,7 +1364,7 @@ do uploadFileOutputStream bufferOS = null;try {if (file != null) bufferOS = new FileOutputStream(file);- writeContentX(procOS, bufferOS, httpc.this.clientInput);+ writeContentX(procOS, bufferOS, clientInput);} finally {if (bufferOS != null) {bufferOS.close();diff --git a/source/de/anomic/http/httpd.java b/source/de/anomic/http/httpd.javaindex 6984b1f61..a1e2bc50f 100644--- a/source/de/anomic/http/httpd.java+++ b/source/de/anomic/http/httpd.java@@ -61,7 +61,6 @@ import java.util.Iterator;import java.util.Properties;import java.util.StringTokenizer;-import de.anomic.plasma.plasmaSwitchboard;import de.anomic.server.serverByteBuffer;import de.anomic.server.serverCodings;import de.anomic.server.serverCore;@@ -71,8 +70,7 @@ import de.anomic.server.serverObjects;import de.anomic.server.serverSwitch;import de.anomic.server.logging.serverLog;import de.anomic.yacy.yacyCore;-import de.anomic.yacy.yacyDHTAction;-import de.anomic.yacy.yacySeed;+/*** Instances of this class can be passed as argument to the serverCore.@@ -126,9 +124,9 @@ public final class httpd implements serverHandler {public static final String hline = "-------------------------------------------------------------------------------";private static HashMap reverseMappingCache = new HashMap();- private static httpdHandler proxyHandler = null; // a servlet that holds the proxy functions- private static httpdHandler fileHandler = null; // a servlet that holds the file serving functions- private static httpdHandler soapHandler = null;+ private httpdHandler proxyHandler = null; // a servlet that holds the proxy functions+ private httpdHandler fileHandler = null; // a servlet that holds the file serving functions+ private httpdHandler soapHandler = null;private static serverSwitch switchboard = null;private static String virtualHost = null;@@ -158,8 +156,8 @@ public final class httpd implements serverHandler {public httpd(serverSwitch s, httpdHandler fileHandler, httpdHandler proxyHandler) {// handler infohttpd.switchboard = s;- httpd.fileHandler = fileHandler;- httpd.proxyHandler = proxyHandler;+ this.fileHandler = fileHandler;+ this.proxyHandler = proxyHandler;httpd.virtualHost = switchboard.getConfig("fileHost","localhost");// authentication: by default none@@ -252,7 +250,7 @@ public final class httpd implements serverHandler {public String error(Throwable e) { // OBLIGATORIC FUNCTION// return string in case of any error that occurs during communication// is always (but not only) called if an IO-dependent exception occurrs.- this.log.logError("Unexpected Error. " + e.getClass().getName(),e);+ this.log.logFailure("Unexpected Error. " + e.getClass().getName(),e);return "501 Exception occurred: " + e.getMessage();}@@ -543,10 +541,10 @@ public final class httpd implements serverHandler {// client closed the connection, so we just end silentlythis.log.logInfo("Client unexpectedly closed connection");} else {- this.log.logError("Unexpected Error. " + e.getClass().getName() + ": " + e.getMessage(),e);+ this.log.logFailure("Unexpected Error. " + e.getClass().getName() + ": " + e.getMessage(),e);}} else {- this.log.logError("Unexpected Error. " + e.getClass().getName(),e);+ this.log.logFailure("Unexpected Error. " + e.getClass().getName(),e);}}}@@ -988,7 +986,7 @@ public final class httpd implements serverHandler {// if we can't find another boundary, then this is an error in the inputif (p < 0) {- serverLog.logError("HTTPD", "ERROR in PUT body: no ending boundary. probably missing values");+ serverLog.logFailure("HTTPD", "ERROR in PUT body: no ending boundary. probably missing values");break;}@@ -1078,7 +1076,7 @@ public final class httpd implements serverHandler {}public Object clone() {- return new httpd(this.switchboard, this.fileHandler, this.proxyHandler);+ return new httpd(this.switchboard, new httpdFileHandler(this.switchboard), new httpdProxyHandler(this.switchboard));}public static final void sendRespondBody(diff --git a/source/de/anomic/http/httpdFileHandler.java b/source/de/anomic/http/httpdFileHandler.javaindex db2ef7898..28e0bf1fb 100644--- a/source/de/anomic/http/httpdFileHandler.java+++ b/source/de/anomic/http/httpdFileHandler.java@@ -128,11 +128,11 @@ public final class httpdFileHandler extends httpdAbstractHandler implements httpString mimeTablePath = switchboard.getConfig("mimeConfig","");FileInputStream mimeTableInputStream = null;try {- serverLog.logSystem("HTTPDFiles", "Loading mime mapping file " + mimeTablePath);+ serverLog.logConfig("HTTPDFiles", "Loading mime mapping file " + mimeTablePath);mimeTableInputStream = new FileInputStream(new File(switchboard.getRootPath(), mimeTablePath));this.mimeTable.load(mimeTableInputStream);} catch (Exception e) {- serverLog.logError("HTTPDFiles", "ERROR: path to configuration file or configuration invalid\n" + e);+ serverLog.logFailure("HTTPDFiles", "ERROR: path to configuration file or configuration invalid\n" + e);System.exit(1);} finally {if (mimeTableInputStream != null) try { mimeTableInputStream.close(); } catch (Exception e1) {}@@ -184,7 +184,7 @@ public final class httpdFileHandler extends httpdAbstractHandler implements httpserverLog.logWarning("HTTPDFileHandler", "Content-MD5 support not availabel ...");}- serverLog.logSystem("HTTPDFileHandler", "File Handler Initialized");+ serverLog.logConfig("HTTPDFileHandler", "File Handler Initialized");}// private void textMessage(OutputStream out, int retcode, String body) throws IOException {@@ -444,7 +444,7 @@ public final class httpdFileHandler extends httpdAbstractHandler implements httptp.put("clientname", switchboard.getConfig("peerName", "anomic"));//System.out.println("respond props: " + ((tp == null) ? "null" : tp.toString())); // debug} catch (InvocationTargetException e) {- this.theLogger.logError("INTERNAL ERROR: " + e.toString() + ":" ++ this.theLogger.logFailure("INTERNAL ERROR: " + e.toString() + ":" +e.getMessage() +" target exception at " + rc + ": " +e.getTargetException().toString() + ":" +diff --git a/source/de/anomic/http/httpdProxyHandler.java b/source/de/anomic/http/httpdProxyHandler.javaindex 00bc1457b..a52e463a6 100644--- a/source/de/anomic/http/httpdProxyHandler.java+++ b/source/de/anomic/http/httpdProxyHandler.java@@ -164,7 +164,7 @@ public final class httpdProxyHandler extends httpdAbstractHandler implements httserverLog.logInfo("PROXY","Proxy access logging is deactivated.");}} catch (Exception e) {- serverLog.logError("PROXY","Unable to configure proxy access logging.",e);+ serverLog.logFailure("PROXY","Unable to configure proxy access logging.",e);}}@@ -225,7 +225,7 @@ public final class httpdProxyHandler extends httpdAbstractHandler implements httf = switchboard.getConfig("proxyYellowList", null);if (f != null) {yellowList = serverFileUtils.loadSet(f);- this.theLogger.logSystem("loaded yellow-list from file " + f + ", " + yellowList.size() + " entries");+ this.theLogger.logConfig("loaded yellow-list from file " + f + ", " + yellowList.size() + " entries");} else {yellowList = new HashSet();}@@ -334,7 +334,7 @@ public final class httpdProxyHandler extends httpdAbstractHandler implements htt} catch (MalformedURLException e) {String errorMsg = "ERROR: internal error with url generation: host=" +host + ", port=" + port + ", path=" + path + ", args=" + args;- serverLog.logError("PROXY", errorMsg);+ serverLog.logFailure("PROXY", errorMsg);httpd.sendRespondError(conProp,respond,4,501,null,errorMsg,e);return;}@@ -414,7 +414,7 @@ public final class httpdProxyHandler extends httpdAbstractHandler implements htt} else if (!conProp.containsKey(httpd.CONNECTION_PROP_PROXY_RESPOND_HEADER)) {String errorMsg = "Unexpected Error. " + e.getClass().getName() + ": " + e.getMessage();httpd.sendRespondError(conProp,respond,4,501,null,errorMsg,e);- this.theLogger.logError(errorMsg);+ this.theLogger.logFailure(errorMsg);} else {this.forceConnectionClose();}@@ -530,11 +530,11 @@ public final class httpdProxyHandler extends httpdAbstractHandler implements htt((ext == null) || (!(plasmaParser.mediaExtContains(ext)))) &&(plasmaParser.realtimeParsableMimeTypesContains(res.responseHeader.mime()))) {// make a transformer- this.theLogger.logDebug("create transformer for URL " + url);+ this.theLogger.logFine("create transformer for URL " + url);hfos = new htmlFilterOutputStream((gzippedOut != null) ? gzippedOut : ((chunkedOut != null)? chunkedOut : respond), null, transformer, (ext.length() == 0));} else {// simply pass through without parsing- this.theLogger.logDebug("create passthrough for URL " + url + ", extension '" + ext + "', mime-type '" + res.responseHeader.mime() + "'");+ this.theLogger.logFine("create passthrough for URL " + url + ", extension '" + ext + "', mime-type '" + res.responseHeader.mime() + "'");hfos = (gzippedOut != null) ? gzippedOut : ((chunkedOut != null)? chunkedOut : respond);}@@ -567,7 +567,7 @@ public final class httpdProxyHandler extends httpdAbstractHandler implements htt{// ok, we don't write actually into a file, only to RAM, and schedule writing the file.byte[] cacheArray = res.writeContent(hfos);- this.theLogger.logDebug("writeContent of " + url + " produced cacheArray = " + ((cacheArray == null) ? "null" : ("size=" + cacheArray.length)));+ this.theLogger.logFine("writeContent of " + url + " produced cacheArray = " + ((cacheArray == null) ? "null" : ("size=" + cacheArray.length)));if (hfos instanceof htmlFilterOutputStream) ((htmlFilterOutputStream) hfos).finalize();@@ -596,7 +596,7 @@ public final class httpdProxyHandler extends httpdAbstractHandler implements httcacheFile.getParentFile().mkdirs();res.writeContent(hfos, cacheFile);if (hfos instanceof htmlFilterOutputStream) ((htmlFilterOutputStream) hfos).finalize();- this.theLogger.logDebug("for write-file of " + url + ": contentLength = " + contentLength + ", sizeBeforeDelete = " + sizeBeforeDelete);+ this.theLogger.logFine("for write-file of " + url + ": contentLength = " + contentLength + ", sizeBeforeDelete = " + sizeBeforeDelete);cacheManager.writeFileAnnouncement(cacheFile);if (sizeBeforeDelete == -1) {// totally fresh file@@ -619,7 +619,7 @@ public final class httpdProxyHandler extends httpdAbstractHandler implements htt}} else {// no caching- this.theLogger.logDebug(cacheFile.toString() + " not cached: " + storeError);+ this.theLogger.logFine(cacheFile.toString() + " not cached: " + storeError);res.writeContent(hfos, null);if (hfos instanceof htmlFilterOutputStream) ((htmlFilterOutputStream) hfos).finalize();if (sizeBeforeDelete == -1) {@@ -669,7 +669,7 @@ public final class httpdProxyHandler extends httpdAbstractHandler implements htt} else {if (e.getMessage().indexOf("Corrupt GZIP trailer") >= 0) {// just do nothing, we leave it this way- this.theLogger.logDebug("ignoring bad gzip trail for URL " + url + " (" + e.getMessage() + ")");+ this.theLogger.logFine("ignoring bad gzip trail for URL " + url + " (" + e.getMessage() + ")");this.forceConnectionClose();} else if ((remote != null)&&(remote.isClosed())) {// TODO: query for broken pipe@@ -892,7 +892,7 @@ public final class httpdProxyHandler extends httpdAbstractHandler implements htt} else if (!conProp.containsKey(httpd.CONNECTION_PROP_PROXY_RESPOND_HEADER)) {String errorMsg = "Unexpected Error. " + e.getClass().getName() + ": " + e.getMessage();httpd.sendRespondError(conProp,respond,4,503,null,errorMsg,e);- this.theLogger.logError(errorMsg);+ this.theLogger.logFailure(errorMsg);} else {this.forceConnectionClose();}@@ -984,7 +984,7 @@ public final class httpdProxyHandler extends httpdAbstractHandler implements htt} else if (!conProp.containsKey(httpd.CONNECTION_PROP_PROXY_RESPOND_HEADER)) {String errorMsg = "Unexpected Error. " + e.getClass().getName() + ": " + e.getMessage();httpd.sendRespondError(conProp,respond,4,503,null,errorMsg,e);- this.theLogger.logError(errorMsg);+ this.theLogger.logFailure(errorMsg);} else {this.forceConnectionClose();}@@ -1278,7 +1278,7 @@ public final class httpdProxyHandler extends httpdAbstractHandler implements httthis.logMessage.append(mime);// sending the logging message to the logger- this.proxyLog.logDebug(this.logMessage.toString());+ this.proxyLog.logFine(this.logMessage.toString());}}diff --git a/source/de/anomic/kelondro/kelondroBufferedRA.java b/source/de/anomic/kelondro/kelondroBufferedRA.javaindex d01bdfa70..2d849f8a7 100644--- a/source/de/anomic/kelondro/kelondroBufferedRA.java+++ b/source/de/anomic/kelondro/kelondroBufferedRA.java@@ -84,7 +84,7 @@ public class kelondroBufferedRA extends kelondroAbstractRA implements kelondroRAwriteBuffer((byte[]) bufferMemory.get(element), element.intValue());bufferMemory.remove(element);int age = bufferScore.deleteScore(element);- de.anomic.server.logging.serverLog.logDebug("CACHE: " + name, "GC; age=" + ((((int) (0xFFFFFFFFL & System.currentTimeMillis())) - age) / 1000));+ de.anomic.server.logging.serverLog.logFine("CACHE: " + name, "GC; age=" + ((((int) (0xFFFFFFFFL & System.currentTimeMillis())) - age) / 1000));}// add new elementbuffer = new byte[bufferElementSize];diff --git a/source/de/anomic/plasma/plasmaCrawlLURL.java b/source/de/anomic/plasma/plasmaCrawlLURL.javaindex 010b068f6..d22b47c9a 100644--- a/source/de/anomic/plasma/plasmaCrawlLURL.java+++ b/source/de/anomic/plasma/plasmaCrawlLURL.java@@ -312,7 +312,7 @@ public class plasmaCrawlLURL extends plasmaURL {dark = !dark;c++;} catch (Exception e) {- serverLog.logError("PLASMA", "genTableProps", e);+ serverLog.logFailure("PLASMA", "genTableProps", e);}}prop.put("table_indexed", c);@@ -385,7 +385,7 @@ public class plasmaCrawlLURL extends plasmaURL {return;}} catch (Exception e) {- serverLog.logError("PLASMA", "INTERNAL ERROR in plasmaLURL.entry/1: " + e.toString(), e);+ serverLog.logFailure("PLASMA", "INTERNAL ERROR in plasmaLURL.entry/1: " + e.toString(), e);}}@@ -417,7 +417,7 @@ public class plasmaCrawlLURL extends plasmaURL {store();//}} catch (Exception e) {- serverLog.logError("PLASMA", "INTERNAL ERROR in plasmaLURL.entry/2: " + e.toString(), e);+ serverLog.logFailure("PLASMA", "INTERNAL ERROR in plasmaLURL.entry/2: " + e.toString(), e);}}@@ -446,7 +446,7 @@ public class plasmaCrawlLURL extends plasmaURL {};urlHashCache.put(entry);} catch (Exception e) {- serverLog.logError("PLASMA", "INTERNAL ERROR AT plasmaCrawlLURL:store:" + e.toString(), e);+ serverLog.logFailure("PLASMA", "INTERNAL ERROR AT plasmaCrawlLURL:store:" + e.toString(), e);}}diff --git a/source/de/anomic/plasma/plasmaCrawlLoader.java b/source/de/anomic/plasma/plasmaCrawlLoader.javaindex 254a99124..6e50d69fe 100644--- a/source/de/anomic/plasma/plasmaCrawlLoader.java+++ b/source/de/anomic/plasma/plasmaCrawlLoader.java@@ -160,7 +160,7 @@ public final class plasmaCrawlLoader extends Thread {this.stopped = true;}catch (Exception e) {- this.log.logError("plasmaCrawlLoader.run/loop", e);+ this.log.logFailure("plasmaCrawlLoader.run/loop", e);}}@@ -173,7 +173,7 @@ public final class plasmaCrawlLoader extends Thread {}catch (Exception e) {// TODO Auto-generated catch block- this.log.logError("plasmaCrawlLoader.run/close", e);+ this.log.logFailure("plasmaCrawlLoader.run/close", e);}}@@ -197,7 +197,7 @@ public final class plasmaCrawlLoader extends Thread {this.theQueue.addMessage(theMsg);} catch (InterruptedException e) {// TODO Auto-generated catch block- this.log.logError("plasmaCrawlLoader.loadParallel", e);+ this.log.logFailure("plasmaCrawlLoader.loadParallel", e);}}}diff --git a/source/de/anomic/plasma/plasmaCrawlNURL.java b/source/de/anomic/plasma/plasmaCrawlNURL.javaindex ae29e5fc1..6b14235e8 100644--- a/source/de/anomic/plasma/plasmaCrawlNURL.java+++ b/source/de/anomic/plasma/plasmaCrawlNURL.java@@ -421,7 +421,7 @@ public class plasmaCrawlNURL extends plasmaURL {} catch (IOException e) {System.out.println("INTERNAL ERROR AT plasmaNURL:store:" + e.toString());} catch (kelondroException e) {- serverLog.logError("PLASMA", "plasmaCrawlNURL.store failed: " + e.getMessage());+ serverLog.logFailure("PLASMA", "plasmaCrawlNURL.store failed: " + e.getMessage());}}diff --git a/source/de/anomic/plasma/plasmaCrawlProfile.java b/source/de/anomic/plasma/plasmaCrawlProfile.javaindex fd30ae6ea..af4ecce39 100644--- a/source/de/anomic/plasma/plasmaCrawlProfile.java+++ b/source/de/anomic/plasma/plasmaCrawlProfile.java@@ -79,7 +79,7 @@ public class plasmaCrawlProfile {profileTableFile.getParentFile().mkdirs();profileTable = new kelondroMap(new kelondroDyn(profileTableFile, 32000, plasmaURL.urlCrawlProfileHandleLength, 2000));} catch (IOException e){- serverLog.logError("PLASMA", "plasmaCrawlProfile.resetDatabase", e);+ serverLog.logFailure("PLASMA", "plasmaCrawlProfile.resetDatabase", e);}}diff --git a/source/de/anomic/plasma/plasmaCrawlWorker.java b/source/de/anomic/plasma/plasmaCrawlWorker.javaindex 420cb134d..052aed749 100644--- a/source/de/anomic/plasma/plasmaCrawlWorker.java+++ b/source/de/anomic/plasma/plasmaCrawlWorker.java@@ -194,7 +194,7 @@ public final class plasmaCrawlWorker extends Thread {this.setName(this.threadBaseName + "_inPool");}catch (Exception e1) {- log.logError("pool error", e1);+ log.logFailure("pool error", e1);}}}@@ -366,7 +366,7 @@ public final class plasmaCrawlWorker extends Thread {// but we clean the cache also, since it may be only partial// and most possible corruptedif (cacheFile.exists()) cacheFile.delete();- log.logError("CRAWLER LOADER ERROR1: with URL=" + url.toString() + ": " + e.toString());+ log.logFailure("CRAWLER LOADER ERROR1: with URL=" + url.toString() + ": " + e.toString());}} else if (res.status.startsWith("30")) {if (crawlingRetryCount > 0) {@@ -391,7 +391,7 @@ public final class plasmaCrawlWorker extends Thread {// if we are already doing a shutdown we don't need to retry crawlingif (Thread.currentThread().isInterrupted()) {- log.logError("CRAWLER Retry of URL=" + url.toString() + " aborted because of server shutdown.");+ log.logFailure("CRAWLER Retry of URL=" + url.toString() + " aborted because of server shutdown.");return;}@@ -463,14 +463,14 @@ public final class plasmaCrawlWorker extends Thread {"Pausing crawlers. ");plasmaCrawlLoader.switchboard.pauseCrawling();} else {- log.logError("CRAWLER Unexpected Error with URL '" + url.toString() + "': " + e.toString(),e);+ log.logFailure("CRAWLER Unexpected Error with URL '" + url.toString() + "': " + e.toString(),e);}if (retryCrawling) {// if we are already doing a shutdown we don't need to retry crawlingif (Thread.currentThread().isInterrupted()) {- log.logError("CRAWLER Retry of URL=" + url.toString() + " aborted because of server shutdown.");+ log.logFailure("CRAWLER Retry of URL=" + url.toString() + " aborted because of server shutdown.");return;}@@ -501,7 +501,7 @@ public final class plasmaCrawlWorker extends Thread {} else {// this may happen if the targeted host does not exist or anything with the// remote server was wrong.- log.logError("CRAWLER LOADER ERROR2 with URL=" + url.toString() + ": " + e.toString(),e);+ log.logFailure("CRAWLER LOADER ERROR2 with URL=" + url.toString() + ": " + e.toString(),e);}} finally {if (remote != null) httpc.returnInstance(remote);diff --git a/source/de/anomic/plasma/plasmaHTCache.java b/source/de/anomic/plasma/plasmaHTCache.javaindex 4af438404..4b47bc9c0 100644--- a/source/de/anomic/plasma/plasmaHTCache.java+++ b/source/de/anomic/plasma/plasmaHTCache.java@@ -181,10 +181,10 @@ public final class plasmaHTCache {// this is the case of a "(Not a directory)" error, which should be prohibited// by the shallStoreCache() property. However, sometimes the error still occurs// In this case do nothing.- log.logError("File storage failed (not a directory): " + e.getMessage());+ log.logFailure("File storage failed (not a directory): " + e.getMessage());return false;} catch (IOException e) {- log.logError("File storage failed (IO error): " + e.getMessage());+ log.logFailure("File storage failed (IO error): " + e.getMessage());return false;}writeFileAnnouncement(file);@@ -260,7 +260,7 @@ public final class plasmaHTCache {} catch (NumberFormatException e) {//e.printStackTrace();}- log.logSystem("CACHE SCANNED, CONTAINS " + c ++ log.logConfig("CACHE SCANNED, CONTAINS " + c +" FILES = " + currCacheSize/1048576 + "MB, OLDEST IS " +((ageHours < 24) ? (ageHours + " HOURS") : ((ageHours / 24) + " DAYS")) + " OLD");cleanup();@@ -275,13 +275,13 @@ public final class plasmaHTCache {ip = httpc.dnsResolve(dom);if (ip == null) break;result += ", " + dom + "=" + ip;- log.logSystem("PRE-FILLED " + dom + "=" + ip);+ log.logConfig("PRE-FILLED " + dom + "=" + ip);c++;doms.deleteScore(dom);// wait a short while to prevent that this looks like a DoStry {Thread.currentThread().sleep(100);} catch (InterruptedException e) {}}- if (result.length() > 2) log.logSystem("PRE-FILLED DNS CACHE, FETCHED " + c ++ if (result.length() > 2) log.logConfig("PRE-FILLED DNS CACHE, FETCHED " + c +" ADDRESSES: " + result.substring(2));}@@ -473,7 +473,7 @@ public final class plasmaHTCache {plasmaCrawlProfile.entry profile) {// normalize url - Borg-0300- serverLog.logDebug("PLASMA", "Entry: URL=" + url.toString());+ serverLog.logFine("PLASMA", "Entry: URL=" + url.toString());this.nomalizedURLString = htmlFilterContentScraper.urlNormalform(url);try {this.url = new URL(nomalizedURLString);diff --git a/source/de/anomic/plasma/plasmaParser.java b/source/de/anomic/plasma/plasmaParser.javaindex a664c564c..3f54dd06a 100644--- a/source/de/anomic/plasma/plasmaParser.java+++ b/source/de/anomic/plasma/plasmaParser.java@@ -354,7 +354,7 @@ public final class plasmaParser {newEnabledParsers.put(mimeType,availableParserList.get(mimeType));} catch (Exception e) {- serverLog.logError("PARSER", "error in setEnabledParserList", e);+ serverLog.logFailure("PARSER", "error in setEnabledParserList", e);} finally {if (theParser != null)try { plasmaParser.theParserPool.returnObject(mimeType,theParser); } catch (Exception e) {}@@ -416,7 +416,7 @@ public final class plasmaParser {// getting an uri to the parser subpackageString packageURI = plasmaParser.class.getResource("/"+plasmaParserPkgName.replace('.','/')).toString();- serverLog.logDebug("PARSER", "Parser directory is " + packageURI);+ serverLog.logFine("PARSER", "Parser directory is " + packageURI);// open the parser directoryFile parserDir = new File(new URI(packageURI));@@ -430,12 +430,12 @@ public final class plasmaParser {if (parserDirectories == null) return;for (int parserDirNr=0; parserDirNr< parserDirectories.length; parserDirNr++) {File currentDir = parserDirectories[parserDirNr];- serverLog.logDebug("PARSER", "Searching in directory " + currentDir.toString());+ serverLog.logFine("PARSER", "Searching in directory " + currentDir.toString());String[] parserClasses = currentDir.list(parserFileNameFilter);if (parserClasses == null) continue;for (int parserNr=0; parserNr<parserClasses.length; parserNr++) {- serverLog.logDebug("PARSER", "Testing parser class " + parserClasses[parserNr]);+ serverLog.logFine("PARSER", "Testing parser class " + parserClasses[parserNr]);String className = parserClasses[parserNr].substring(0,parserClasses[parserNr].indexOf(".class"));String fullClassName = plasmaParserPkgName + "." + currentDir.getName() + "." + className;try {@@ -472,7 +472,7 @@ public final class plasmaParser {}} catch (Exception e) {- serverLog.logError("PARSER", "Unable to determine all installed parsers. " + e.getMessage());+ serverLog.logFailure("PARSER", "Unable to determine all installed parsers. " + e.getMessage());}}diff --git a/source/de/anomic/plasma/plasmaSearch.java b/source/de/anomic/plasma/plasmaSearch.javaindex 90ab758d2..d24fb65ef 100644--- a/source/de/anomic/plasma/plasmaSearch.java+++ b/source/de/anomic/plasma/plasmaSearch.java@@ -224,7 +224,7 @@ public final class plasmaSearch {if (large.contains(ie)) conj.addEntry(ie);}} catch (kelondroException e) {- serverLog.logError("PLASMA", "joinConstructiveByTest: Database corrupt (" + e.getMessage() + "), deleting index");+ serverLog.logFailure("PLASMA", "joinConstructiveByTest: Database corrupt (" + e.getMessage() + "), deleting index");small.deleteComplete();return conj;}@@ -243,14 +243,14 @@ public final class plasmaSearch {try {ie1 = (plasmaWordIndexEntry) e1.nextElement();} catch (kelondroException e) {- serverLog.logError("PLASMA", "joinConstructiveByEnumeration: Database corrupt 1 (" + e.getMessage() + "), deleting index");+ serverLog.logFailure("PLASMA", "joinConstructiveByEnumeration: Database corrupt 1 (" + e.getMessage() + "), deleting index");i1.deleteComplete();return conj;}try {ie2 = (plasmaWordIndexEntry) e2.nextElement();} catch (kelondroException e) {- serverLog.logError("PLASMA", "joinConstructiveByEnumeration: Database corrupt 2 (" + e.getMessage() + "), deleting index");+ serverLog.logFailure("PLASMA", "joinConstructiveByEnumeration: Database corrupt 2 (" + e.getMessage() + "), deleting index");i2.deleteComplete();return conj;}@@ -261,7 +261,7 @@ public final class plasmaSearch {try {if (e1.hasMoreElements()) ie1 = (plasmaWordIndexEntry) e1.nextElement(); else break;} catch (kelondroException e) {- serverLog.logError("PLASMA", "joinConstructiveByEnumeration: Database 1 corrupt (" + e.getMessage() + "), deleting index");+ serverLog.logFailure("PLASMA", "joinConstructiveByEnumeration: Database 1 corrupt (" + e.getMessage() + "), deleting index");i1.deleteComplete();break;}@@ -269,7 +269,7 @@ public final class plasmaSearch {try {if (e2.hasMoreElements()) ie2 = (plasmaWordIndexEntry) e2.nextElement(); else break;} catch (kelondroException e) {- serverLog.logError("PLASMA", "joinConstructiveByEnumeration: Database 2 corrupt (" + e.getMessage() + "), deleting index");+ serverLog.logFailure("PLASMA", "joinConstructiveByEnumeration: Database 2 corrupt (" + e.getMessage() + "), deleting index");i2.deleteComplete();break;}@@ -279,14 +279,14 @@ public final class plasmaSearch {try {if (e1.hasMoreElements()) ie1 = (plasmaWordIndexEntry) e1.nextElement(); else break;} catch (kelondroException e) {- serverLog.logError("PLASMA", "joinConstructiveByEnumeration: Database 1 corrupt (" + e.getMessage() + "), deleting index");+ serverLog.logFailure("PLASMA", "joinConstructiveByEnumeration: Database 1 corrupt (" + e.getMessage() + "), deleting index");i1.deleteComplete();break;}try {if (e2.hasMoreElements()) ie2 = (plasmaWordIndexEntry) e2.nextElement(); else break;} catch (kelondroException e) {- serverLog.logError("PLASMA", "joinConstructiveByEnumeration: Database 2 corrupt (" + e.getMessage() + "), deleting index");+ serverLog.logFailure("PLASMA", "joinConstructiveByEnumeration: Database 2 corrupt (" + e.getMessage() + "), deleting index");i2.deleteComplete();break;}@@ -315,11 +315,11 @@ public final class plasmaSearch {acc.addResult(entry);}} catch (kelondroException ee) {- serverLog.logError("PLASMA", "Database Failure during plasmaSearch.order: " + ee.getMessage(), ee);+ serverLog.logFailure("PLASMA", "Database Failure during plasmaSearch.order: " + ee.getMessage(), ee);}long startSortTime = System.currentTimeMillis();acc.sortResults();- serverLog.logDebug("PLASMA", "plasmaSearch.order: minEntries = " + minEntries + ", effectiveEntries = " + acc.sizeOrdered() + ", demanded Time = " + maxTime + ", effectiveTime = " + (System.currentTimeMillis() - startCreateTime) + ", createTime = " + (startSortTime - startCreateTime) + ", sortTime = " + (System.currentTimeMillis() - startSortTime));+ serverLog.logFine("PLASMA", "plasmaSearch.order: minEntries = " + minEntries + ", effectiveEntries = " + acc.sizeOrdered() + ", demanded Time = " + maxTime + ", effectiveTime = " + (System.currentTimeMillis() - startCreateTime) + ", createTime = " + (startSortTime - startCreateTime) + ", sortTime = " + (System.currentTimeMillis() - startSortTime));return acc;}diff --git a/source/de/anomic/plasma/plasmaSnippetCache.java b/source/de/anomic/plasma/plasmaSnippetCache.javaindex 1f31b7109..d52132bc6 100644--- a/source/de/anomic/plasma/plasmaSnippetCache.java+++ b/source/de/anomic/plasma/plasmaSnippetCache.java@@ -299,7 +299,7 @@ public class plasmaSnippetCache {String nextSnippet = computeSnippet(sentences, remaininghashes, minLength, maxLength);return result + ((nextSnippet == null) ? "" : (" / " + nextSnippet));} catch (IndexOutOfBoundsException e) {- log.logError("computeSnippet: error with string generation", e);+ log.logFailure("computeSnippet: error with string generation", e);return "";}}@@ -401,12 +401,12 @@ public class plasmaSnippetCache {this.queryhashes = queryhashes;}public void run() {- log.logDebug("snippetFetcher: try to get URL " + url);+ log.logFine("snippetFetcher: try to get URL " + url);plasmaSnippetCache.result snippet = retrieve(url, queryhashes, true, 260);if (snippet.line == null)- log.logDebug("snippetFetcher: cannot get URL " + url + ". error(" + snippet.source + "): " + snippet.error);+ log.logFine("snippetFetcher: cannot get URL " + url + ". error(" + snippet.source + "): " + snippet.error);else- log.logDebug("snippetFetcher: got URL " + url + ", the snippet is '" + snippet.line + "', source=" + snippet.source);+ log.logFine("snippetFetcher: got URL " + url + ", the snippet is '" + snippet.line + "', source=" + snippet.source);}}diff --git a/source/de/anomic/plasma/plasmaSwitchboard.java b/source/de/anomic/plasma/plasmaSwitchboard.javaindex d1056d393..60b3ad7ff 100644--- a/source/de/anomic/plasma/plasmaSwitchboard.java+++ b/source/de/anomic/plasma/plasmaSwitchboard.java@@ -228,9 +228,9 @@ public final class plasmaSwitchboard extends serverAbstractSwitch implements serString f = getConfig("proxyBlackListsActive", null);if (f != null) {urlBlacklist.loadLists("black", f, "/");- log.logSystem("loaded black-list from file " + f + ", " + urlBlacklist.size() + " entries");+ log.logConfig("loaded black-list from file " + f + ", " + urlBlacklist.size() + " entries");}- log.logSystem("Proxy Handler Initialized");+ log.logConfig("Proxy Handler Initialized");// load stopwordsif (stopwords == null) {@@ -245,21 +245,21 @@ public final class plasmaSwitchboard extends serverAbstractSwitch implements serint ramHTTP = Integer.parseInt(getConfig("ramCacheHTTP", "1024")) / 1024;int ramMessage = Integer.parseInt(getConfig("ramCacheMessage", "1024")) / 1024;int ramWiki = Integer.parseInt(getConfig("ramCacheWiki", "1024")) / 1024;- log.logSystem("LURL Cache memory = " + ppRamString(ramLURL));- log.logSystem("NURL Cache memory = " + ppRamString(ramNURL));- log.logSystem("EURL Cache memory = " + ppRamString(ramEURL));- log.logSystem("RWI Cache memory = " + ppRamString(ramRWI));- log.logSystem("HTTP Cache memory = " + ppRamString(ramHTTP));- log.logSystem("Message Cache memory = " + ppRamString(ramMessage));- log.logSystem("Wiki Cache memory = " + ppRamString(ramWiki));+ log.logConfig("LURL Cache memory = " + ppRamString(ramLURL));+ log.logConfig("NURL Cache memory = " + ppRamString(ramNURL));+ log.logConfig("EURL Cache memory = " + ppRamString(ramEURL));+ log.logConfig("RWI Cache memory = " + ppRamString(ramRWI));+ log.logConfig("HTTP Cache memory = " + ppRamString(ramHTTP));+ log.logConfig("Message Cache memory = " + ppRamString(ramMessage));+ log.logConfig("Wiki Cache memory = " + ppRamString(ramWiki));// make crawl profiles database and default profiles- log.logSystem("Initializing Crawl Profiles");+ log.logConfig("Initializing Crawl Profiles");profiles = new plasmaCrawlProfile(new File(plasmaPath, "crawlProfiles0.db"));initProfiles();// start indexing management- log.logSystem("Starting Indexing Management");+ log.logConfig("Starting Indexing Management");urlPool = new plasmaURLPool(plasmaPath, ramLURL, ramNURL, ramEURL);wordIndex = new plasmaWordIndex(plasmaPath, ramRWI, log);@@ -268,7 +268,7 @@ public final class plasmaSwitchboard extends serverAbstractSwitch implements sersearchManager = new plasmaSearch(urlPool.loadedURL, wordIndex);// start a cache manager- log.logSystem("Starting HT Cache Manager");+ log.logConfig("Starting HT Cache Manager");// create the Cache directorie - Borg-0300String cp = getConfig("proxyCache", "DATA/HTCACHE");@@ -278,7 +278,7 @@ public final class plasmaSwitchboard extends serverAbstractSwitch implements serif (!(htCachePath.exists())) htCachePath.mkdirs();if (!(htCachePath.isDirectory())) {// if the cache does not exists or is a file and not a directory, panic- serverLog.logSystem("PLASMA", "the cache path " + htCachePath.toString() + " is not a directory or does not exists and cannot be created");+ serverLog.logConfig("PLASMA", "the cache path " + htCachePath.toString() + " is not a directory or does not exists and cannot be created");System.exit(0);} else {serverLog.logInfo("PLASMA", "proxyCache=" + cp);@@ -288,24 +288,24 @@ public final class plasmaSwitchboard extends serverAbstractSwitch implements serthis.cacheManager = new plasmaHTCache(htCachePath, maxCacheSize, ramHTTP);// make parser- log.logSystem("Starting Parser");+ log.logConfig("Starting Parser");this.parser = new plasmaParser();// initialize switchboard queuesbQueue = new plasmaSwitchboardQueue(this.cacheManager, urlPool.loadedURL, new File(plasmaPath, "switchboardQueue1.stack"), 10, profiles);// define an extension-blacklist- log.logSystem("Parser: Initializing Extension Mappings for Media/Parser");+ log.logConfig("Parser: Initializing Extension Mappings for Media/Parser");plasmaParser.initMediaExt(plasmaParser.extString2extList(getConfig("mediaExt","")));plasmaParser.initSupportedRealtimeFileExt(plasmaParser.extString2extList(getConfig("parseableExt","")));// define a realtime parsable mimetype list- log.logSystem("Parser: Initializing Mime Types");+ log.logConfig("Parser: Initializing Mime Types");plasmaParser.initRealtimeParsableMimeTypes(getConfig("parseableRealtimeMimeTypes","application/xhtml+xml,text/html,text/plain"));plasmaParser.initParseableMimeTypes(getConfig("parseableMimeTypes",null));// start a loader- log.logSystem("Starting Crawl Loader");+ log.logConfig("Starting Crawl Loader");int remoteport;try { remoteport = Integer.parseInt(getConfig("remoteProxyPort","3128")); }catch (NumberFormatException e) { remoteport = 3128; }@@ -318,19 +318,19 @@ public final class plasmaSwitchboard extends serverAbstractSwitch implements serthis.log);// init boards- log.logSystem("Starting Message Board");+ log.logConfig("Starting Message Board");messageDB = new messageBoard(new File(getRootPath(), "DATA/SETTINGS/message.db"), ramMessage);- log.logSystem("Starting Wiki Board");+ log.logConfig("Starting Wiki Board");wikiDB = new wikiBoard(new File(getRootPath(), "DATA/SETTINGS/wiki.db"),new File(getRootPath(), "DATA/SETTINGS/wiki-bkp.db"), ramWiki);// init cookie-Monitor- log.logSystem("Starting Cookie Monitor");+ log.logConfig("Starting Cookie Monitor");outgoingCookies = new HashMap();incomingCookies = new HashMap();// clean up profiles- log.logSystem("Cleaning Profiles");+ log.logConfig("Cleaning Profiles");cleanProfiles();// init facility DB@@ -350,13 +350,13 @@ public final class plasmaSwitchboard extends serverAbstractSwitch implements ser*/// generate snippets cache- log.logSystem("Initializing Snippet Cache");+ log.logConfig("Initializing Snippet Cache");snippetCache = new plasmaSnippetCache(cacheManager, parser,remoteProxyHost, remoteProxyPort, remoteProxyUse,log);// start yacy core- log.logSystem("Starting YaCy Protocol Core");+ log.logConfig("Starting YaCy Protocol Core");//try{Thread.currentThread().sleep(5000);} catch (InterruptedException e) {} // for profilerthis.yc = new yacyCore(this);//log.logSystem("Started YaCy Protocol Core");@@ -364,7 +364,7 @@ public final class plasmaSwitchboard extends serverAbstractSwitch implements serserverInstantThread.oneTimeJob(yc, "loadSeeds", yc.log, 3000);// deploy threads- log.logSystem("Starting Threads");+ log.logConfig("Starting Threads");System.gc(); // help for profilerint indexing_cluster = Integer.parseInt(getConfig("80_indexing_cluster", "1"));if (indexing_cluster < 1) indexing_cluster = 1;@@ -424,7 +424,7 @@ public final class plasmaSwitchboard extends serverAbstractSwitch implements ser//plasmaSnippetCache.result scr = snippetCache.retrieve(new URL("http://www.heise.de/kiosk/archiv/ct/2003/4/20"), query, true, 260);sb=this;- log.logSystem("Finished Switchboard Initialization");+ log.logConfig("Finished Switchboard Initialization");}public static plasmaSwitchboard getSwitchboard(){@@ -554,12 +554,12 @@ public final class plasmaSwitchboard extends serverAbstractSwitch implements ser}public void close() {- log.logSystem("SWITCHBOARD SHUTDOWN STEP 1: sending termination signal to managed threads:");+ log.logConfig("SWITCHBOARD SHUTDOWN STEP 1: sending termination signal to managed threads:");terminateAllThreads(true);- log.logSystem("SWITCHBOARD SHUTDOWN STEP 2: sending termination signal to threaded indexing (stand by..)");+ log.logConfig("SWITCHBOARD SHUTDOWN STEP 2: sending termination signal to threaded indexing (stand by..)");int waitingBoundSeconds = Integer.parseInt(getConfig("maxWaitingWordFlush", "120"));wordIndex.close(waitingBoundSeconds);- log.logSystem("SWITCHBOARD SHUTDOWN STEP 3: sending termination signal to database manager");+ log.logConfig("SWITCHBOARD SHUTDOWN STEP 3: sending termination signal to database manager");try {indexDistribution.close();cacheLoader.close();@@ -572,7 +572,7 @@ public final class plasmaSwitchboard extends serverAbstractSwitch implements sercacheManager.close();sbQueue.close();} catch (IOException e) {}- log.logSystem("SWITCHBOARD SHUTDOWN TERMINATED");+ log.logConfig("SWITCHBOARD SHUTDOWN TERMINATED");}public int queueSize() {@@ -592,14 +592,14 @@ public final class plasmaSwitchboard extends serverAbstractSwitch implements sertry {sbQueue.push((plasmaSwitchboardQueue.Entry) job);} catch (IOException e) {- log.logError("IOError in plasmaSwitchboard.enQueue: " + e.getMessage(), e);+ log.logFailure("IOError in plasmaSwitchboard.enQueue: " + e.getMessage(), e);}}public boolean deQueue() {// work off fresh entries from the proxy or from the crawlerif (onlineCaution()) {- log.logDebug("deQueue: online caution, omitting resource stack processing");+ log.logFine("deQueue: online caution, omitting resource stack processing");return false;}plasmaSwitchboardQueue.Entry nextentry;@@ -610,7 +610,7 @@ public final class plasmaSwitchboard extends serverAbstractSwitch implements ser}// do one processing step- log.logDebug("DEQUEUE: sbQueueSize=" + sbQueue.size() ++ log.logFine("DEQUEUE: sbQueueSize=" + sbQueue.size() +", coreStackSize=" + urlPool.noticeURL.stackSize(plasmaCrawlNURL.STACK_TYPE_CORE) +", limitStackSize=" + urlPool.noticeURL.stackSize(plasmaCrawlNURL.STACK_TYPE_LIMIT) +", overhangStackSize=" + urlPool.noticeURL.stackSize(plasmaCrawlNURL.STACK_TYPE_OVERHANG) +@@ -619,7 +619,7 @@ public final class plasmaSwitchboard extends serverAbstractSwitch implements sernextentry = sbQueue.pop();if (nextentry == null) return false;} catch (IOException e) {- log.logError("IOError in plasmaSwitchboard.deQueue: " + e.getMessage(), e);+ log.logFailure("IOError in plasmaSwitchboard.deQueue: " + e.getMessage(), e);return false;}}@@ -705,17 +705,17 @@ public final class plasmaSwitchboard extends serverAbstractSwitch implements serreturn false;}if (sbQueue.size() >= indexingSlots) {- log.logDebug("CoreCrawl: too many processes in indexing queue, dismissed (" ++ log.logFine("CoreCrawl: too many processes in indexing queue, dismissed (" +"sbQueueSize=" + sbQueue.size() + ")");return false;}if (cacheLoader.size() >= crawlSlots) {- log.logDebug("CoreCrawl: too many processes in loader queue, dismissed (" ++ log.logFine("CoreCrawl: too many processes in loader queue, dismissed (" +"cacheLoader=" + cacheLoader.size() + ")");return false;}if (onlineCaution()) {- log.logDebug("CoreCrawl: online caution, omitting processing");+ log.logFine("CoreCrawl: online caution, omitting processing");return false;}// if the server is busy, we do crawling more slowly@@ -735,21 +735,21 @@ public final class plasmaSwitchboard extends serverAbstractSwitch implements serplasmaCrawlNURL.Entry urlEntry = urlPool.noticeURL.pop(plasmaCrawlNURL.STACK_TYPE_CORE);String stats = "LOCALCRAWL[" + urlPool.noticeURL.stackSize(plasmaCrawlNURL.STACK_TYPE_CORE) + ", " + urlPool.noticeURL.stackSize(plasmaCrawlNURL.STACK_TYPE_LIMIT) + ", " + urlPool.noticeURL.stackSize(plasmaCrawlNURL.STACK_TYPE_OVERHANG) + ", " + urlPool.noticeURL.stackSize(plasmaCrawlNURL.STACK_TYPE_REMOTE) + "]";if ((urlEntry.url() == null) || (urlEntry.url().toString().length() < 10)) {- log.logError(stats + ": urlEntry.url() == null. URL-Hash: " + ((urlEntry.hash()==null)?"Unknown":urlEntry.hash()));+ log.logFailure(stats + ": urlEntry.url() == null. URL-Hash: " + ((urlEntry.hash()==null)?"Unknown":urlEntry.hash()));return true;}String profileHandle = urlEntry.profileHandle();//System.out.println("DEBUG plasmaSwitchboard.processCrawling: profileHandle = " + profileHandle + ", urlEntry.url = " + urlEntry.url());if (profileHandle == null) {- log.logError(stats + ": NULL PROFILE HANDLE '" + urlEntry.profileHandle() + "' (must be internal error) for URL " + urlEntry.url());+ log.logFailure(stats + ": NULL PROFILE HANDLE '" + urlEntry.profileHandle() + "' (must be internal error) for URL " + urlEntry.url());return true;}plasmaCrawlProfile.entry profile = profiles.getEntry(profileHandle);if (profile == null) {- log.logError(stats + ": LOST PROFILE HANDLE '" + urlEntry.profileHandle() + "' (must be internal error) for URL " + urlEntry.url());+ log.logFailure(stats + ": LOST PROFILE HANDLE '" + urlEntry.profileHandle() + "' (must be internal error) for URL " + urlEntry.url());return true;}- log.logDebug("LOCALCRAWL: url=" + urlEntry.url() + ", initiator=" + urlEntry.initiator() ++ log.logFine("LOCALCRAWL: url=" + urlEntry.url() + ", initiator=" + urlEntry.initiator() +", crawlOrder=" + ((profile.remoteIndexing()) ? "true" : "false") + ", depth=" + urlEntry.depth() + ", crawlDepth=" + profile.generalDepth() + ", filter=" + profile.generalFilter() +", permission=" + ((yacyCore.seedDB == null) ? "undefined" : (((yacyCore.seedDB.mySeed.isSenior()) || (yacyCore.seedDB.mySeed.isPrincipal())) ? "true" : "false")));@@ -782,12 +782,12 @@ public final class plasmaSwitchboard extends serverAbstractSwitch implements serif (sbQueue.size() >= indexingSlots) {- log.logDebug("LimitCrawl: too many processes in indexing queue, dismissed to protect emergency case (" ++ log.logFine("LimitCrawl: too many processes in indexing queue, dismissed to protect emergency case (" +"sbQueueSize=" + sbQueue.size() + ")");return false;}if (cacheLoader.size() >= crawlSlots) {- log.logDebug("LimitCrawl: too many processes in loader queue, dismissed to protect emergency case (" ++ log.logFine("LimitCrawl: too many processes in loader queue, dismissed to protect emergency case (" +"cacheLoader=" + cacheLoader.size() + ")");return false;}@@ -810,17 +810,17 @@ public final class plasmaSwitchboard extends serverAbstractSwitch implements serplasmaCrawlNURL.Entry urlEntry = urlPool.noticeURL.pop(plasmaCrawlNURL.STACK_TYPE_LIMIT);String stats = "REMOTECRAWLTRIGGER[" + urlPool.noticeURL.stackSize(plasmaCrawlNURL.STACK_TYPE_CORE) + ", " + urlPool.noticeURL.stackSize(plasmaCrawlNURL.STACK_TYPE_LIMIT) + ", " + urlPool.noticeURL.stackSize(plasmaCrawlNURL.STACK_TYPE_OVERHANG) + ", " + urlPool.noticeURL.stackSize(plasmaCrawlNURL.STACK_TYPE_REMOTE) + "]";if (urlEntry.url() == null) {- log.logError(stats + ": urlEntry.url() == null");+ log.logFailure(stats + ": urlEntry.url() == null");return true;}String profileHandle = urlEntry.profileHandle();//System.out.println("DEBUG plasmaSwitchboard.processCrawling: profileHandle = " + profileHandle + ", urlEntry.url = " + urlEntry.url());plasmaCrawlProfile.entry profile = profiles.getEntry(profileHandle);if (profile == null) {- log.logError(stats + ": LOST PROFILE HANDLE '" + urlEntry.profileHandle() + "' (must be internal error) for URL " + urlEntry.url());+ log.logFailure(stats + ": LOST PROFILE HANDLE '" + urlEntry.profileHandle() + "' (must be internal error) for URL " + urlEntry.url());return true;}- log.logDebug("plasmaSwitchboard.limitCrawlTriggerJob: url=" + urlEntry.url() + ", initiator=" + urlEntry.initiator() ++ log.logFine("plasmaSwitchboard.limitCrawlTriggerJob: url=" + urlEntry.url() + ", initiator=" + urlEntry.initiator() +", crawlOrder=" + ((profile.remoteIndexing()) ? "true" : "false") + ", depth=" + urlEntry.depth() + ", crawlDepth=" + profile.generalDepth() + ", filter=" + profile.generalFilter() +", permission=" + ((yacyCore.seedDB == null) ? "undefined" : (((yacyCore.seedDB.mySeed.isSenior()) || (yacyCore.seedDB.mySeed.isPrincipal())) ? "true" : "false")));@@ -854,7 +854,7 @@ public final class plasmaSwitchboard extends serverAbstractSwitch implements serreturn false;}if (onlineCaution()) {- log.logDebug("GlobalCrawl: online caution, omitting processing");+ log.logFine("GlobalCrawl: online caution, omitting processing");return false;}@@ -872,7 +872,7 @@ public final class plasmaSwitchboard extends serverAbstractSwitch implements serplasmaCrawlNURL.Entry urlEntry = urlPool.noticeURL.pop(plasmaCrawlNURL.STACK_TYPE_REMOTE);String stats = "REMOTETRIGGEREDCRAWL[" + urlPool.noticeURL.stackSize(plasmaCrawlNURL.STACK_TYPE_CORE) + ", " + urlPool.noticeURL.stackSize(plasmaCrawlNURL.STACK_TYPE_LIMIT) + ", " + urlPool.noticeURL.stackSize(plasmaCrawlNURL.STACK_TYPE_OVERHANG) + ", " + urlPool.noticeURL.stackSize(plasmaCrawlNURL.STACK_TYPE_REMOTE) + "]";if (urlEntry.url() == null) {- log.logError(stats + ": urlEntry.url() == null");+ log.logFailure(stats + ": urlEntry.url() == null");return false;}String profileHandle = urlEntry.profileHandle();@@ -880,10 +880,10 @@ public final class plasmaSwitchboard extends serverAbstractSwitch implements serplasmaCrawlProfile.entry profile = profiles.getEntry(profileHandle);if (profile == null) {- log.logError(stats + ": LOST PROFILE HANDLE '" + urlEntry.profileHandle() + "' (must be internal error) for URL " + urlEntry.url());+ log.logFailure(stats + ": LOST PROFILE HANDLE '" + urlEntry.profileHandle() + "' (must be internal error) for URL " + urlEntry.url());return false;}- log.logDebug("plasmaSwitchboard.remoteTriggeredCrawlJob: url=" + urlEntry.url() + ", initiator=" + urlEntry.initiator() ++ log.logFine("plasmaSwitchboard.remoteTriggeredCrawlJob: url=" + urlEntry.url() + ", initiator=" + urlEntry.initiator() +", crawlOrder=" + ((profile.remoteIndexing()) ? "true" : "false") + ", depth=" + urlEntry.depth() + ", crawlDepth=" + profile.generalDepth() + ", filter=" + profile.generalFilter() +", permission=" + ((yacyCore.seedDB == null) ? "undefined" : (((yacyCore.seedDB.mySeed.isSenior()) || (yacyCore.seedDB.mySeed.isPrincipal())) ? "true" : "false")));@@ -916,7 +916,7 @@ public final class plasmaSwitchboard extends serverAbstractSwitch implements serprocessCase = 6;}- log.logDebug("processResourceStack processCase=" + processCase ++ log.logFine("processResourceStack processCase=" + processCase +", depth=" + entry.depth() +", maxDepth=" + ((entry.profile() == null) ? "null" : Integer.toString(entry.profile().generalDepth())) +", filter=" + ((entry.profile() == null) ? "null" : entry.profile().generalFilter()) +@@ -930,18 +930,18 @@ public final class plasmaSwitchboard extends serverAbstractSwitch implements ser((entry.responseHeader() != null) &&(plasmaParser.supportedMimeTypesContains(entry.responseHeader().mime())))) {if (entry.cacheFile().exists()) {- log.logDebug("(Parser) '" + entry.normalizedURLString() + "' is not parsed yet, parsing now from File");+ log.logFine("(Parser) '" + entry.normalizedURLString() + "' is not parsed yet, parsing now from File");document = parser.parseSource(entry.url(), (entry.responseHeader() == null) ? null : entry.responseHeader().mime(), entry.cacheFile());} else {- log.logDebug("(Parser) '" + entry.normalizedURLString() + "' cannot be parsed, no resource available");+ log.logFine("(Parser) '" + entry.normalizedURLString() + "' cannot be parsed, no resource available");return;}if (document == null) {- log.logError("(Parser) '" + entry.normalizedURLString() + "' parse failure");+ log.logFailure("(Parser) '" + entry.normalizedURLString() + "' parse failure");return;}} else {- log.logDebug("(Parser) '" + entry.normalizedURLString() + "'. Unsupported mimeType '" + ((entry.responseHeader() == null) ? null : entry.responseHeader().mime()) + "'.");+ log.logFine("(Parser) '" + entry.normalizedURLString() + "'. Unsupported mimeType '" + ((entry.responseHeader() == null) ? null : entry.responseHeader().mime()) + "'.");return;}@@ -991,7 +991,7 @@ public final class plasmaSwitchboard extends serverAbstractSwitch implements ser}if (noIndexReason == null) {// strip out words- log.logDebug("Condensing for '" + entry.normalizedURLString() + "'");+ log.logFine("Condensing for '" + entry.normalizedURLString() + "'");plasmaCondenser condenser = new plasmaCondenser(new ByteArrayInputStream(document.getText()));//log.logInfo("INDEXING HEADLINE:" + descr);@@ -1035,10 +1035,10 @@ public final class plasmaSwitchboard extends serverAbstractSwitch implements seryacyClient.crawlReceipt(initiator, "crawl", "fill", "indexed", newEntry, "");}} else {- log.logDebug("Not Indexed Resource '" + entry.normalizedURLString() + "': process case=" + processCase);+ log.logFine("Not Indexed Resource '" + entry.normalizedURLString() + "': process case=" + processCase);}} catch (Exception ee) {- log.logError("Could not index URL " + entry.url() + ": " + ee.getMessage(), ee);+ log.logFailure("Could not index URL " + entry.url() + ": " + ee.getMessage(), ee);if ((processCase == 6) && (initiator != null)) {yacyClient.crawlReceipt(initiator, "crawl", "exception", ee.getMessage(), null, "");}@@ -1058,7 +1058,7 @@ public final class plasmaSwitchboard extends serverAbstractSwitch implements serdocument = null;} catch (IOException e) {- log.logError("ERROR in plasmaSwitchboard.process(): " + e.toString());+ log.logFailure("ERROR in plasmaSwitchboard.process(): " + e.toString());} finally {// explicit delete/free resourcesif ((entry != null) && (entry.profile() != null) && (!(entry.profile().storeHTCache()))) cacheManager.deleteFile(entry.url());@@ -1075,7 +1075,7 @@ public final class plasmaSwitchboard extends serverAbstractSwitch implements ser// strange errorsif (nexturlString == null) {reason = "denied_(url_null)";- log.logError("Wrong URL in stackCrawl: url=null");+ log.logFailure("Wrong URL in stackCrawl: url=null");return reason;}/*@@ -1092,7 +1092,7 @@ public final class plasmaSwitchboard extends serverAbstractSwitch implements sernexturl = new URL(nexturlString);} catch (MalformedURLException e) {reason = "denied_(url_'" + nexturlString + "'_wrong)";- log.logError("Wrong URL in stackCrawl: " + nexturlString);+ log.logFailure("Wrong URL in stackCrawl: " + nexturlString);return reason;}@@ -1177,13 +1177,13 @@ public final class plasmaSwitchboard extends serverAbstractSwitch implements ser// are we qualified?if ((yacyCore.seedDB.mySeed == null) ||(yacyCore.seedDB.mySeed.isJunior())) {- log.logDebug("plasmaSwitchboard.processRemoteCrawlTrigger: no permission");+ log.logFine("plasmaSwitchboard.processRemoteCrawlTrigger: no permission");return false;}// check urlif (urlEntry.url() == null) {- log.logDebug("ERROR: plasmaSwitchboard.processRemoteCrawlTrigger - url is null. name=" + urlEntry.name());+ log.logFine("ERROR: plasmaSwitchboard.processRemoteCrawlTrigger - url is null. name=" + urlEntry.name());return true;}String urlhash = plasmaURL.urlHash(urlEntry.url());@@ -1192,7 +1192,7 @@ public final class plasmaSwitchboard extends serverAbstractSwitch implements seryacySeed remoteSeed = yacyCore.dhtAgent.getCrawlSeed(urlhash);if (remoteSeed == null) {- log.logDebug("plasmaSwitchboard.processRemoteCrawlTrigger: no remote crawl seed available");+ log.logFine("plasmaSwitchboard.processRemoteCrawlTrigger: no remote crawl seed available");return false;}@@ -1222,7 +1222,7 @@ public final class plasmaSwitchboard extends serverAbstractSwitch implements serif (remoteSeed != null) yacyCore.peerActions.peerDeparture(remoteSeed);return false;} else try {- log.logDebug("plasmaSwitchboard.processRemoteCrawlTrigger: remoteSeed=" + remoteSeed.getName() + ", url=" + urlEntry.url().toString() + ", response=" + page.toString()); // DEBUG+ log.logFine("plasmaSwitchboard.processRemoteCrawlTrigger: remoteSeed=" + remoteSeed.getName() + ", url=" + urlEntry.url().toString() + ", response=" + page.toString()); // DEBUGint newdelay = Integer.parseInt((String) page.get("delay"));yacyCore.dhtAgent.setCrawlDelay(remoteSeed.hash, newdelay);@@ -1250,7 +1250,7 @@ public final class plasmaSwitchboard extends serverAbstractSwitch implements ser}} catch (Exception e) {// wrong values- log.logError("REMOTECRAWLTRIGGER: REMOTE CRAWL TO PEER " + remoteSeed.getName() + " FAILED. CLIENT RETURNED: " + page.toString(), e);+ log.logFailure("REMOTECRAWLTRIGGER: REMOTE CRAWL TO PEER " + remoteSeed.getName() + " FAILED. CLIENT RETURNED: " + page.toString(), e);return false;}}@@ -1277,19 +1277,19 @@ public final class plasmaSwitchboard extends serverAbstractSwitch implements serpublic void run() {try {// search the database locally- log.logDebug("presearch: started job");+ log.logFine("presearch: started job");plasmaWordIndexEntity idx = searchManager.searchHashes(queryhashes, time);- log.logDebug("presearch: found " + idx.size() + " results");+ log.logFine("presearch: found " + idx.size() + " results");plasmaSearch.result acc = searchManager.order(idx, queryhashes, stopwords, order, time, searchcount);if (acc == null) return;- log.logDebug("presearch: ordered results, now " + acc.sizeOrdered() + " URLs ready for fetch");+ log.logFine("presearch: ordered results, now " + acc.sizeOrdered() + " URLs ready for fetch");// take some elements and fetch the snippetssnippetCache.fetch(acc, queryhashes, urlmask, fetchcount);} catch (IOException e) {- log.logError("presearch: failed", e);+ log.logFailure("presearch: failed", e);}- log.logDebug("presearch: job terminated");+ log.logFine("presearch: job terminated");}}@@ -1335,7 +1335,7 @@ public final class plasmaSwitchboard extends serverAbstractSwitch implements serif (fetchpeers < 10) fetchpeers = 10;if (fetchcount > count * 10) fetchcount = count * 10;globalresults = yacySearch.searchHashes(queryhashes, urlPool.loadedURL, searchManager, fetchcount, fetchpeers, urlBlacklist, snippetCache, fetchtime);- log.logDebug("SEARCH TIME AFTER GLOBAL-TRIGGER TO " + fetchpeers + " PEERS: " + ((System.currentTimeMillis() - timestamp) / 1000) + " seconds");+ log.logFine("SEARCH TIME AFTER GLOBAL-TRIGGER TO " + fetchpeers + " PEERS: " + ((System.currentTimeMillis() - timestamp) / 1000) + " seconds");}prop.put("globalresults", globalresults); // the result are written to the local DB@@ -1343,14 +1343,14 @@ public final class plasmaSwitchboard extends serverAbstractSwitch implements ser// now search locally (the global results should be now in the local db)long remainingTime = time - (System.currentTimeMillis() - timestamp);plasmaWordIndexEntity idx = searchManager.searchHashes(queryhashes, remainingTime * 8 / 10); // the search- log.logDebug("SEARCH TIME AFTER FINDING " + idx.size() + " ELEMENTS: " + ((System.currentTimeMillis() - timestamp) / 1000) + " seconds");+ log.logFine("SEARCH TIME AFTER FINDING " + idx.size() + " ELEMENTS: " + ((System.currentTimeMillis() - timestamp) / 1000) + " seconds");remainingTime = time - (System.currentTimeMillis() - timestamp);if (remainingTime < 500) remainingTime = 500;if (remainingTime > 3000) remainingTime = 3000;plasmaSearch.result acc = searchManager.order(idx, queryhashes, stopwords, order, remainingTime, 10);if (!(global)) snippetCache.fetch(acc.cloneSmart(), queryhashes, urlmask, 10);- log.logDebug("SEARCH TIME AFTER ORDERING OF SEARCH RESULT: " + ((System.currentTimeMillis() - timestamp) / 1000) + " seconds");+ log.logFine("SEARCH TIME AFTER ORDERING OF SEARCH RESULT: " + ((System.currentTimeMillis() - timestamp) / 1000) + " seconds");// result is a List of urlEntry elements: prepare answerif (acc == null) {@@ -1427,7 +1427,7 @@ public final class plasmaSwitchboard extends serverAbstractSwitch implements ser}}}- log.logDebug("SEARCH TIME AFTER RESULT PREPARATION: " + ((System.currentTimeMillis() - timestamp) / 1000) + " seconds");+ log.logFine("SEARCH TIME AFTER RESULT PREPARATION: " + ((System.currentTimeMillis() - timestamp) / 1000) + " seconds");// calc some more cross-referenceremainingTime = time - (System.currentTimeMillis() - timestamp);@@ -1444,7 +1444,7 @@ public final class plasmaSwitchboard extends serverAbstractSwitch implements ser**///Object[] ws = ref.getScores(16, false, 2, Integer.MAX_VALUE);Object[] ws = acc.getReferences(16);- log.logDebug("SEARCH TIME AFTER XREF PREPARATION: " + ((System.currentTimeMillis() - timestamp) / 1000) + " seconds");+ log.logFine("SEARCH TIME AFTER XREF PREPARATION: " + ((System.currentTimeMillis() - timestamp) / 1000) + " seconds");/*System.out.print("DEBUG WORD-SCORE: ");diff --git a/source/de/anomic/plasma/plasmaSwitchboardQueue.java b/source/de/anomic/plasma/plasmaSwitchboardQueue.javaindex 5f420d809..2aa6bf3ce 100644--- a/source/de/anomic/plasma/plasmaSwitchboardQueue.java+++ b/source/de/anomic/plasma/plasmaSwitchboardQueue.java@@ -225,7 +225,7 @@ public class plasmaSwitchboardQueue {if (responseHeader == null) try {responseHeader = htCache.getCachedResponse(plasmaURL.urlHash(url));} catch (IOException e) {- serverLog.logError("PLASMA", "responseHeader: failed to get header", e);+ serverLog.logFailure("PLASMA", "responseHeader: failed to get header", e);return null;}return responseHeader;diff --git a/source/de/anomic/plasma/plasmaWordIndexAssortment.java b/source/de/anomic/plasma/plasmaWordIndexAssortment.javaindex 852521c2c..d3e3f95b4 100644--- a/source/de/anomic/plasma/plasmaWordIndexAssortment.java+++ b/source/de/anomic/plasma/plasmaWordIndexAssortment.java@@ -110,19 +110,19 @@ public final class plasmaWordIndexAssortment {// open existing assortment tree filetry {assortments = new kelondroTree(assortmentFile, bufferSize);- if (log != null) log.logSystem("Opened Assortment Database, " + assortments.size() + " entries, width " + assortmentLength + ", " + bufferkb + "kb buffer");+ if (log != null) log.logConfig("Opened Assortment Database, " + assortments.size() + " entries, width " + assortmentLength + ", " + bufferkb + "kb buffer");return;} catch (IOException e){- serverLog.logError("PLASMA", "unable to open assortment database, creating new: " + e.getMessage(), e);+ serverLog.logFailure("PLASMA", "unable to open assortment database, creating new: " + e.getMessage(), e);}assortmentFile.delete(); // make space for new one}// create new assortment tree filetry {assortments = new kelondroTree(assortmentFile, bufferSize, bufferStructure(assortmentLength));- if (log != null) log.logSystem("Created new Assortment Database, width " + assortmentLength + ", " + bufferkb + "kb buffer");+ if (log != null) log.logConfig("Created new Assortment Database, width " + assortmentLength + ", " + bufferkb + "kb buffer");} catch (IOException e){- serverLog.logError("PLASMA", "unable to create assortment database: " + e.getMessage(), e);+ serverLog.logFailure("PLASMA", "unable to create assortment database: " + e.getMessage(), e);}}@@ -189,7 +189,7 @@ public final class plasmaWordIndexAssortment {try {assortments = new kelondroTree(assortmentFile, bufferSize, bufferStructure(assortmentLength));} catch (IOException e){- log.logError("unable to re-create assortment database: " + e.getMessage(), e);+ log.logFailure("unable to re-create assortment database: " + e.getMessage(), e);}}@@ -215,7 +215,7 @@ public final class plasmaWordIndexAssortment {try {assortments.close();} catch (IOException e){- log.logError("unable to close assortment database: " + e.getMessage(), e);+ log.logFailure("unable to close assortment database: " + e.getMessage(), e);}}diff --git a/source/de/anomic/plasma/plasmaWordIndexCache.java b/source/de/anomic/plasma/plasmaWordIndexCache.javaindex c2047e0d7..6a431ff90 100644--- a/source/de/anomic/plasma/plasmaWordIndexCache.java+++ b/source/de/anomic/plasma/plasmaWordIndexCache.java@@ -127,7 +127,7 @@ public final class plasmaWordIndexCache implements plasmaWordIndexInterface {try {restore();} catch (IOException e){- log.logError("unable to restore cache dump: " + e.getMessage(), e);+ log.logFailure("unable to restore cache dump: " + e.getMessage(), e);}// start permanent flushing@@ -136,7 +136,7 @@ public final class plasmaWordIndexCache implements plasmaWordIndexInterface {private void dump(int waitingSeconds) throws IOException {- log.logSystem("creating dump for index cache, " + cache.size() + " words (and much more urls)");+ log.logConfig("creating dump for index cache, " + cache.size() + " words (and much more urls)");File indexDumpFile = new File(databaseRoot, indexArrayFileName);if (indexDumpFile.exists()) indexDumpFile.delete();kelondroArray dumpArray = null;@@ -187,7 +187,7 @@ public final class plasmaWordIndexCache implements plasmaWordIndexInterface {}dumpArray.close();dumpArray = null;- log.logSystem("dumped " + urlcount + " word/url relations in " + ((System.currentTimeMillis() - startTime) / 1000) + " seconds");+ log.logConfig("dumped " + urlcount + " word/url relations in " + ((System.currentTimeMillis() - startTime) / 1000) + " seconds");} finally {if (dumpArray != null) try {dumpArray.close();}catch(Exception e){}}@@ -197,7 +197,7 @@ public final class plasmaWordIndexCache implements plasmaWordIndexInterface {File indexDumpFile = new File(databaseRoot, indexArrayFileName);if (!(indexDumpFile.exists())) return 0;kelondroArray dumpArray = new kelondroArray(indexDumpFile);- log.logSystem("restore array dump of index cache, " + dumpArray.size() + " word/url relations");+ log.logConfig("restore array dump of index cache, " + dumpArray.size() + " word/url relations");long startTime = System.currentTimeMillis();long messageTime = System.currentTimeMillis() + 5000;long urlCount = 0, urlsPerSecond = 0;@@ -233,10 +233,10 @@ public final class plasmaWordIndexCache implements plasmaWordIndexInterface {}dumpArray.close();- log.logSystem("restored " + cache.size() + " words in " + ((System.currentTimeMillis() - startTime) / 1000) + " seconds");+ log.logConfig("restored " + cache.size() + " words in " + ((System.currentTimeMillis() - startTime) / 1000) + " seconds");} catch (kelondroException e) {// restore failed- log.logError("restore of indexCache array dump failed: " + e.getMessage(), e);+ log.logFailure("restore of indexCache array dump failed: " + e.getMessage(), e);} finally {if (dumpArray != null) try {dumpArray.close();}catch(Exception e){}}@@ -359,7 +359,7 @@ public final class plasmaWordIndexCache implements plasmaWordIndexInterface {flushFromMem(hash);}} catch (Exception e) {- log.logError("flushFromMem: " + e.getMessage(), e);+ log.logFailure("flushFromMem: " + e.getMessage(), e);}flushThread.proceed();}@@ -520,7 +520,7 @@ public final class plasmaWordIndexCache implements plasmaWordIndexInterface {try {dump(waitingSeconds);} catch (IOException e){- log.logError("unable to dump cache: " + e.getMessage(), e);+ log.logFailure("unable to dump cache: " + e.getMessage(), e);}}diff --git a/source/de/anomic/plasma/plasmaWordIndexClassicCacheMigration.java b/source/de/anomic/plasma/plasmaWordIndexClassicCacheMigration.javaindex 6237a3b23..f0bc2a233 100644--- a/source/de/anomic/plasma/plasmaWordIndexClassicCacheMigration.java+++ b/source/de/anomic/plasma/plasmaWordIndexClassicCacheMigration.java@@ -127,7 +127,7 @@ public class plasmaWordIndexClassicCacheMigration {try {return indexCache.rows(true, false, null);} catch (kelondroException e) {- de.anomic.server.logging.serverLog.logError("PLASMA", "kelondro error in plasmaWordIndexFileCache: " + e.getMessage());+ de.anomic.server.logging.serverLog.logFailure("PLASMA", "kelondro error in plasmaWordIndexFileCache: " + e.getMessage());return new HashSet().iterator();}}@@ -171,7 +171,7 @@ public class plasmaWordIndexClassicCacheMigration {remove(hash);return true;} catch (Exception e) {- serverLog.logError("PLASMA MIGRATION", "oneStepMigration error: " + e.getMessage(), e);+ serverLog.logFailure("PLASMA MIGRATION", "oneStepMigration error: " + e.getMessage(), e);return false;}}diff --git a/source/de/anomic/plasma/plasmaWordIndexClassicDB.java b/source/de/anomic/plasma/plasmaWordIndexClassicDB.javaindex 9be8eeda7..f3d28bd8f 100644--- a/source/de/anomic/plasma/plasmaWordIndexClassicDB.java+++ b/source/de/anomic/plasma/plasmaWordIndexClassicDB.java@@ -185,7 +185,7 @@ public class plasmaWordIndexClassicDB implements plasmaWordIndexInterface {try {return new plasmaWordIndexEntity(databaseRoot, wordHash, deleteIfEmpty);} catch (IOException e) {- log.logError("plasmaWordIndexClassic.getIndex: " + e.getMessage());+ log.logFailure("plasmaWordIndexClassic.getIndex: " + e.getMessage());return null;}}@@ -200,7 +200,7 @@ public class plasmaWordIndexClassicDB implements plasmaWordIndexInterface {try {plasmaWordIndexEntity.removePlasmaIndex(databaseRoot, wordHash);} catch (IOException e) {- log.logError("plasmaWordIndexClassic.deleteIndex: " + e.getMessage());+ log.logFailure("plasmaWordIndexClassic.deleteIndex: " + e.getMessage());return;}}@@ -218,7 +218,7 @@ public class plasmaWordIndexClassicDB implements plasmaWordIndexInterface {if ((deleteComplete) && (size == 0)) deleteIndex(wordHash);return count;} catch (IOException e) {- log.logError("plasmaWordIndexClassic.removeEntries: " + e.getMessage());+ log.logFailure("plasmaWordIndexClassic.removeEntries: " + e.getMessage());return count;}}@@ -238,7 +238,7 @@ public class plasmaWordIndexClassicDB implements plasmaWordIndexInterface {pi = null;return count;} catch (IOException e) {- log.logError("plasmaWordIndexClassic.addEntries: " + e.getMessage());+ log.logFailure("plasmaWordIndexClassic.addEntries: " + e.getMessage());return 0;}}diff --git a/source/de/anomic/plasma/plasmaWordIndexDistribution.java b/source/de/anomic/plasma/plasmaWordIndexDistribution.javaindex 0bda530ab..b61438aa8 100644--- a/source/de/anomic/plasma/plasmaWordIndexDistribution.java+++ b/source/de/anomic/plasma/plasmaWordIndexDistribution.java@@ -68,35 +68,35 @@ public class plasmaWordIndexDistribution {public boolean job() {if (this.closed) {- log.logDebug("no word distribution: closed");+ log.logFine("no word distribution: closed");return false;}if (yacyCore.seedDB == null) {- log.logDebug("no word distribution: seedDB == null");+ log.logFine("no word distribution: seedDB == null");return false;}if (yacyCore.seedDB.mySeed == null) {- log.logDebug("no word distribution: mySeed == null");+ log.logFine("no word distribution: mySeed == null");return false;}if (yacyCore.seedDB.mySeed.isVirgin()) {- log.logDebug("no word distribution: status is virgin");+ log.logFine("no word distribution: status is virgin");return false;}if (!(enabled)) {- log.logDebug("no word distribution: not enabled");+ log.logFine("no word distribution: not enabled");return false;}if (urlPool.loadedURL.size() < 10) {- log.logDebug("no word distribution: loadedURL.size() = " + urlPool.loadedURL.size());+ log.logFine("no word distribution: loadedURL.size() = " + urlPool.loadedURL.size());return false;}if (wordIndex.size() < 100) {- log.logDebug("no word distribution: not enough words - wordIndex.size() = " + wordIndex.size());+ log.logFine("no word distribution: not enough words - wordIndex.size() = " + wordIndex.size());return false;}if ((!enabledWhileCrawling) && (urlPool.noticeURL.stackSize() > 0)) {- log.logDebug("no word distribution: crawl in progress - noticeURL.stackSize() = " + urlPool.noticeURL.stackSize());+ log.logFine("no word distribution: crawl in progress - noticeURL.stackSize() = " + urlPool.noticeURL.stackSize());return false;}@@ -106,7 +106,7 @@ public class plasmaWordIndexDistribution {int transferred = performTransferIndex(indexCount, peerCount, true);if (transferred <= 0) {- log.logDebug("no word distribution: transfer failed");+ log.logFine("no word distribution: transfer failed");return false;}@@ -135,12 +135,12 @@ public class plasmaWordIndexDistribution {// collect indexString startPointHash = selectTransferStart();- log.logDebug("Selected hash " + startPointHash + " as start point for index distribution, distance = " + yacyDHTAction.dhtDistance(yacyCore.seedDB.mySeed.hash, startPointHash));+ log.logFine("Selected hash " + startPointHash + " as start point for index distribution, distance = " + yacyDHTAction.dhtDistance(yacyCore.seedDB.mySeed.hash, startPointHash));Object[] selectResult = selectTransferIndexes(startPointHash, indexCount);plasmaWordIndexEntity[] indexEntities = (plasmaWordIndexEntity[]) selectResult[0];HashMap urlCache = (HashMap) selectResult[1]; // String (url-hash) / plasmaCrawlLURL.Entryif ((indexEntities == null) || (indexEntities.length == 0)) {- log.logDebug("No index available for index transfer, hash start-point " + startPointHash);+ log.logFine("No index available for index transfer, hash start-point " + startPointHash);return -1;}// count the indexes again, can be smaller as expected@@ -162,7 +162,7 @@ public class plasmaWordIndexDistribution {long start;while ((e.hasMoreElements()) && (hc < peerCount)) {if (closed) {- log.logError("Index distribution interrupted by close, nothing deleted locally.");+ log.logFailure("Index distribution interrupted by close, nothing deleted locally.");return -1; // interrupted}seed = (yacySeed) e.nextElement();@@ -192,14 +192,14 @@ public class plasmaWordIndexDistribution {if (delete) {try {if (deleteTransferIndexes(indexEntities)) {- log.logDebug("Deleted all " + indexEntities.length + " transferred whole-word indexes locally");+ log.logFine("Deleted all " + indexEntities.length + " transferred whole-word indexes locally");return indexCount;} else {- log.logError("Deleted not all transferred whole-word indexes");+ log.logFailure("Deleted not all transferred whole-word indexes");return -1;}} catch (IOException ee) {- log.logError("Deletion of indexes not possible:" + ee.getMessage(), ee);+ log.logFailure("Deletion of indexes not possible:" + ee.getMessage(), ee);return -1;}} else {@@ -210,7 +210,7 @@ public class plasmaWordIndexDistribution {}return indexCount;} else {- log.logError("Index distribution failed. Too less peers (" + hc + ") received the index, not deleted locally.");+ log.logFailure("Index distribution failed. Too less peers (" + hc + ") received the index, not deleted locally.");return -1;}}@@ -274,10 +274,10 @@ public class plasmaWordIndexDistribution {}// use whats remainingtmpEntities.add(indexEntity);- log.logDebug("Selected whole index (" + indexEntity.size() + " URLs, " + unknownURLEntries.size() + " not bound) for word " + indexEntity.wordHash());+ log.logFine("Selected whole index (" + indexEntity.size() + " URLs, " + unknownURLEntries.size() + " not bound) for word " + indexEntity.wordHash());count -= indexEntity.size();} catch (kelondroException e) {- log.logError("plasmaWordIndexDistribution/1: deleted DB for word " + indexEntity.wordHash(), e);+ log.logFailure("plasmaWordIndexDistribution/1: deleted DB for word " + indexEntity.wordHash(), e);try {indexEntity.deleteComplete();} catch (IOException ee) {}}} else {@@ -308,10 +308,10 @@ public class plasmaWordIndexDistribution {indexEntity.removeEntry((String) hashIter.next(), true);}// use whats remaining- log.logDebug("Selected partial index (" + tmpEntity.size() + " from " + indexEntity.size() +" URLs, " + unknownURLEntries.size() + " not bound) for word " + tmpEntity.wordHash());+ log.logFine("Selected partial index (" + tmpEntity.size() + " from " + indexEntity.size() +" URLs, " + unknownURLEntries.size() + " not bound) for word " + tmpEntity.wordHash());tmpEntities.add(tmpEntity);} catch (kelondroException e) {- log.logError("plasmaWordIndexDistribution/2: deleted DB for word " + indexEntity.wordHash(), e);+ log.logFailure("plasmaWordIndexDistribution/2: deleted DB for word " + indexEntity.wordHash(), e);try {indexEntity.deleteComplete();} catch (IOException ee) {}}indexEntity.close(); // important: is not closed elswhere and cannot be deleted afterwards@@ -324,10 +324,10 @@ public class plasmaWordIndexDistribution {for (int i = 0; i < tmpEntities.size(); i++) indexEntities[i] = (plasmaWordIndexEntity) tmpEntities.elementAt(i);return new Object[]{indexEntities, knownURLs};} catch (IOException e) {- log.logError("selectTransferIndexes IO-Error (hash=" + nexthash + "): " + e.getMessage(), e);+ log.logFailure("selectTransferIndexes IO-Error (hash=" + nexthash + "): " + e.getMessage(), e);return new Object[]{new plasmaWordIndexEntity[0], new HashMap()};} catch (kelondroException e) {- log.logError("selectTransferIndexes database corrupted: " + e.getMessage(), e);+ log.logFailure("selectTransferIndexes database corrupted: " + e.getMessage(), e);return new Object[]{new plasmaWordIndexEntity[0], new HashMap()};}}@@ -354,7 +354,7 @@ public class plasmaWordIndexDistribution {indexEntity = wordIndex.getEntity(indexEntities[i].wordHash(), true);sz = indexEntity.size();indexEntity.close();- log.logDebug("Deleted partial index (" + c + " URLs) for word " + indexEntities[i].wordHash() + "; " + sz + " entries left");+ log.logFine("Deleted partial index (" + c + " URLs) for word " + indexEntities[i].wordHash() + "; " + sz + " entries left");// DEBUG: now try to delete the remaining index. If this works, this routine is fine/*if (wordIndex.getEntity(indexEntities[i].wordHash()).deleteComplete())@@ -373,7 +373,7 @@ public class plasmaWordIndexDistribution {// have another try...if (!(plasmaWordIndexEntity.wordHash2path(wordIndex.getRoot() /*PLASMADB*/, indexEntities[i].wordHash()).delete())) {success = false;- log.logError("Could not delete whole index for word " + indexEntities[i].wordHash());+ log.logFailure("Could not delete whole index for word " + indexEntities[i].wordHash());}}}diff --git a/source/de/anomic/server/logging/serverLog.java b/source/de/anomic/server/logging/serverLog.javaindex c98bc8ef3..9e88b949b 100644--- a/source/de/anomic/server/logging/serverLog.java+++ b/source/de/anomic/server/logging/serverLog.java@@ -53,20 +53,18 @@ public final class serverLog {// // log-level categoriespublic static final int LOGLEVEL_ZERO = Level.OFF.intValue(); // no output at allpublic static final int LOGLEVEL_FAILURE = Level.SEVERE.intValue(); // system-level error, internal cause, critical and not fixeable (i.e. inconsistency)- public static final int LOGLEVEL_ERROR = 950; // exceptional error, catcheable and non-critical (i.e. file error)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_SYSTEM = Level.CONFIG.intValue(); // regular system status information (i.e. start-up messages)+ 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_DEBUG = Level.FINEST.intValue(); // in-function status debug output+ public static final int LOGLEVEL_FINE = Level.FINE.intValue(); // in-function status debug output//// // these categories are also present as character tokenspublic static final char LOGTOKEN_ZERO = 'Z';- public static final char LOGTOKEN_FAILURE = 'F';- public static final char LOGTOKEN_ERROR = 'E';+ public static final char LOGTOKEN_FAILURE = 'E';public static final char LOGTOKEN_WARNING = 'W';- public static final char LOGTOKEN_SYSTEM = 'S';+ public static final char LOGTOKEN_CONFIG = 'S';public static final char LOGTOKEN_INFO = 'I';- public static final char LOGTOKEN_DEBUG = 'D';+ public static final char LOGTOKEN_FINE = 'D';private final Logger theLogger;@@ -79,24 +77,20 @@ public final class serverLog {this.theLogger.setLevel(newLevel);}- // class log messages- public void logFailure(String message) {this.theLogger.severe(message);}- public void logFailure(String message, Throwable thrown) {this.theLogger.log(Level.SEVERE,message,thrown);}-- public void logError(String message) {this.theLogger.severe(message);}- public void logError(String message, Throwable thrown) {this.theLogger.log(Level.SEVERE,message,thrown);}+ public void logFailure(String message) {this.theLogger.severe(message);}+ public void logFailure(String message, Throwable thrown) {this.theLogger.log(Level.SEVERE,message,thrown);}public void logWarning(String message) {this.theLogger.warning(message);}public void logWarning(String message, Throwable thrown) {this.theLogger.log(Level.WARNING,message,thrown);}- public void logSystem(String message) {this.theLogger.config(message);}- public void logSystem(String message, Throwable thrown) {this.theLogger.log(Level.CONFIG,message,thrown);}+ public void logConfig(String message) {this.theLogger.config(message);}+ public void logConfig(String message, Throwable thrown) {this.theLogger.log(Level.CONFIG,message,thrown);}public void logInfo(String message) {this.theLogger.info(message);}public void logInfo(String message, Throwable thrown) {this.theLogger.log(Level.INFO,message,thrown);}- public void logDebug(String message) {this.theLogger.finest(message);}- public void logDebug(String message, Throwable thrown) {this.theLogger.log(Level.FINEST,message,thrown);}+ 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@@ -107,18 +101,11 @@ public final class serverLog {private void log(Level level, String msg, Throwable thrown) {this.theLogger.log(level, msg, thrown);}-- public static void logFailure(String appName, String message) {- Logger.getLogger(appName).severe(message);- }- public static void logFailure(String appName, String message, Throwable thrown) {- Logger.getLogger(appName).log(Level.SEVERE,message,thrown);- }-- public static void logError(String appName, String message) {++ public static void logFailure(String appName, String message) {Logger.getLogger(appName).severe(message);}- public static void logError(String appName, String message, Throwable thrown) {+ public static void logFailure(String appName, String message, Throwable thrown) {Logger.getLogger(appName).log(Level.SEVERE,message,thrown);}@@ -129,10 +116,10 @@ public final class serverLog {Logger.getLogger(appName).log(Level.WARNING,message,thrown);}- public static void logSystem(String appName, String message) {+ public static void logConfig(String appName, String message) {Logger.getLogger(appName).config(message);}- public static void logSystem(String appName, String message, Throwable thrown) {+ public static void logConfig(String appName, String message, Throwable thrown) {Logger.getLogger(appName).log(Level.CONFIG,message,thrown);}@@ -143,10 +130,10 @@ public final class serverLog {Logger.getLogger(appName).log(Level.INFO,message,thrown);}- public static void logDebug(String appName, String message) {+ public static void logFine(String appName, String message) {Logger.getLogger(appName).finest(message);}- public static void logDebug(String appName, String message, Throwable thrown) {+ public static void logFine(String appName, String message, Throwable thrown) {Logger.getLogger(appName).log(Level.FINEST,message,thrown);}diff --git a/source/de/anomic/server/logging/serverSimpleLogFormatter.java b/source/de/anomic/server/logging/serverSimpleLogFormatter.javaindex 73c2e08ec..86ffc1baa 100644--- a/source/de/anomic/server/logging/serverSimpleLogFormatter.java+++ b/source/de/anomic/server/logging/serverSimpleLogFormatter.java@@ -33,18 +33,18 @@ public class serverSimpleLogFormatter extends SimpleFormatter {int logLevel = record.getLevel().intValue();if (logLevel == serverLog.LOGLEVEL_FAILURE)this.buffer.append(serverLog.LOGTOKEN_FAILURE);- else if (logLevel == serverLog.LOGLEVEL_ERROR)- this.buffer.append(serverLog.LOGTOKEN_ERROR);+ else if (logLevel == serverLog.LOGLEVEL_FAILURE)+ this.buffer.append(serverLog.LOGTOKEN_FAILURE);else if (logLevel == serverLog.LOGLEVEL_WARNING)this.buffer.append(serverLog.LOGTOKEN_WARNING);- else if (logLevel == serverLog.LOGLEVEL_SYSTEM)- this.buffer.append(serverLog.LOGTOKEN_SYSTEM);+ else if (logLevel == serverLog.LOGLEVEL_CONFIG)+ this.buffer.append(serverLog.LOGTOKEN_CONFIG);else if (logLevel == serverLog.LOGLEVEL_INFO)this.buffer.append(serverLog.LOGTOKEN_INFO);- else if (logLevel == serverLog.LOGLEVEL_DEBUG)- this.buffer.append(serverLog.LOGTOKEN_DEBUG);+ else if (logLevel == serverLog.LOGLEVEL_FINE)+ this.buffer.append(serverLog.LOGTOKEN_FINE);else- this.buffer.append(serverLog.LOGTOKEN_DEBUG);+ this.buffer.append(serverLog.LOGTOKEN_FINE);this.buffer.append(' ');// adding the logging datediff --git a/source/de/anomic/server/serverAbstractSwitch.java b/source/de/anomic/server/serverAbstractSwitch.javaindex 6618037a2..95ce8ee69 100644--- a/source/de/anomic/server/serverAbstractSwitch.java+++ b/source/de/anomic/server/serverAbstractSwitch.java@@ -146,7 +146,7 @@ public abstract class serverAbstractSwitch implements serverSwitch {try {action.doBevoreSetConfig(key, value);} catch (Exception e) {- log.logError("serverAction bevoreSetConfig '" + action.getShortDescription() + "' failed with exception: " + e.getMessage());+ log.logFailure("serverAction bevoreSetConfig '" + action.getShortDescription() + "' failed with exception: " + e.getMessage());}}@@ -162,7 +162,7 @@ public abstract class serverAbstractSwitch implements serverSwitch {try {action.doAfterSetConfig(key, value, oldValue);} catch (Exception e) {- log.logError("serverAction afterSetConfig '" + action.getShortDescription() + "' failed with exception: " + e.getMessage());+ log.logFailure("serverAction afterSetConfig '" + action.getShortDescription() + "' failed with exception: " + e.getMessage());}}}@@ -181,7 +181,7 @@ public abstract class serverAbstractSwitch implements serverSwitch {try {action.doWhenGetConfig(key, s, dflt);} catch (Exception e) {- log.logError("serverAction whenGetConfig '" + action.getShortDescription() + "' failed with exception: " + e.getMessage());+ log.logFailure("serverAction whenGetConfig '" + action.getShortDescription() + "' failed with exception: " + e.getMessage());}}diff --git a/source/de/anomic/server/serverAbstractThread.java b/source/de/anomic/server/serverAbstractThread.javaindex b6ec4bc80..9d9b78cb1 100644--- a/source/de/anomic/server/serverAbstractThread.java+++ b/source/de/anomic/server/serverAbstractThread.java@@ -184,23 +184,23 @@ public abstract class serverAbstractThread extends Thread implements serverThrea}private final void logError(String text) {- if (log == null) serverLog.logError("THREAD-CONTROL", text);- else log.logError(text);+ if (log == null) serverLog.logFailure("THREAD-CONTROL", text);+ else log.logFailure(text);}private final void logError(String text,Throwable thrown) {- if (log == null) serverLog.logError("THREAD-CONTROL", text, thrown);- else log.logError(text,thrown);+ if (log == null) serverLog.logFailure("THREAD-CONTROL", text, thrown);+ else log.logFailure(text,thrown);}private void logSystem(String text) {- if (log == null) serverLog.logSystem("THREAD-CONTROL", text);- else log.logSystem(text);+ if (log == null) serverLog.logConfig("THREAD-CONTROL", text);+ else log.logConfig(text);}private void logSystem(String text, Throwable thrown) {- if (log == null) serverLog.logSystem("THREAD-CONTROL", text, thrown);- else log.logSystem(text,thrown);+ if (log == null) serverLog.logConfig("THREAD-CONTROL", text, thrown);+ else log.logConfig(text,thrown);}public void jobExceptionHandler(Exception e) {@@ -279,7 +279,7 @@ public abstract class serverAbstractThread extends Thread implements serverThreaThread.sleep(millis);}} catch (InterruptedException e) {- if (this.log != null) this.log.logSystem("thread '" + this.getName() + "' interrupted because of shutdown.");+ if (this.log != null) this.log.logConfig("thread '" + this.getName() + "' interrupted because of shutdown.");}}@@ -297,7 +297,7 @@ public abstract class serverAbstractThread extends Thread implements serverThreapublic void notifyThread() {if (this.syncObject != null) {synchronized(this.syncObject) {- if (this.log != null) this.log.logDebug("thread '" + this.getName() + "' has received a notification from thread '" + Thread.currentThread().getName() + "'.");+ if (this.log != null) this.log.logFine("thread '" + this.getName() + "' has received a notification from thread '" + Thread.currentThread().getName() + "'.");this.syncObject.notifyAll();}}diff --git a/source/de/anomic/server/serverCore.java b/source/de/anomic/server/serverCore.javaindex 4b1e8efb7..b0505cd65 100644--- a/source/de/anomic/server/serverCore.java+++ b/source/de/anomic/server/serverCore.java@@ -221,10 +221,10 @@ public final class serverCore extends serverAbstractThread implements serverThretry {this.initPortForwarding();} catch (Exception e) {- this.log.logError("Unable to initialize server port forwarding.",e);+ this.log.logFailure("Unable to initialize server port forwarding.",e);this.switchboard.setConfig("portForwardingEnabled","false");} catch (Error e) {- this.log.logError("Unable to initialize server port forwarding.",e);+ this.log.logFailure("Unable to initialize server port forwarding.",e);this.switchboard.setConfig("portForwardingEnabled","false");}@@ -385,7 +385,7 @@ public final class serverCore extends serverAbstractThread implements serverThre}public void open() {- this.log.logSystem("* server started on " + publicLocalIP() + ":" + this.port);+ this.log.logConfig("* server started on " + publicLocalIP() + ":" + this.port);}// class body@@ -394,7 +394,7 @@ public final class serverCore extends serverAbstractThread implements serverThre// idleThreadCheck();this.switchboard.handleBusyState(this.theSessionPool.getNumActive() /*activeThreads.size() */);- log.logDebug(+ log.logFine("* waiting for connections, " + this.theSessionPool.getNumActive() + " sessions running, " +this.theSessionPool.getNumIdle() + " sleeping");@@ -463,7 +463,7 @@ public final class serverCore extends serverAbstractThread implements serverThrethis.log.logWarning("Unable to close the session pool.");}- this.log.logSystem("* terminated");+ this.log.logConfig("* terminated");}public int getJobCount() {@@ -541,7 +541,7 @@ public final class serverCore extends serverAbstractThread implements serverThreserverCore.this.theSessionThreadGroup.interrupt();// if there are some sessions that are blocking in IO, we simply close the socket- serverCore.this.log.logDebug("Trying to abort " + serverCore.this.theSessionThreadGroup.activeCount() + " remaining session threads ...");+ serverCore.this.log.logFine("Trying to abort " + serverCore.this.theSessionThreadGroup.activeCount() + " remaining session threads ...");for ( int currentThreadIdx = 0; currentThreadIdx < threadCount; currentThreadIdx++ ) {Thread currentThread = threadList[currentThreadIdx];if (currentThread.isAlive()) {@@ -551,18 +551,18 @@ public final class serverCore extends serverAbstractThread implements serverThre}// we need to use a timeout here because of missing interruptable session threads ...- serverCore.this.log.logDebug("Waiting for " + serverCore.this.theSessionThreadGroup.activeCount() + " remaining session threads to finish shutdown ...");+ serverCore.this.log.logFine("Waiting for " + serverCore.this.theSessionThreadGroup.activeCount() + " remaining session threads to finish shutdown ...");for ( int currentThreadIdx = 0; currentThreadIdx < threadCount; currentThreadIdx++ ) {Thread currentThread = threadList[currentThreadIdx];if (currentThread.isAlive()) {- serverCore.this.log.logDebug("Waiting for session thread '" + currentThread.getName() + "' [" + currentThreadIdx + "] to finish shutdown.");+ serverCore.this.log.logFine("Waiting for session thread '" + currentThread.getName() + "' [" + currentThreadIdx + "] to finish shutdown.");try { currentThread.join(500); } catch (InterruptedException ex) {}}}serverCore.this.log.logInfo("Shutdown of remaining session threads finish.");} catch (Exception e) {- serverCore.this.log.logError("Unexpected error while trying to shutdown all remaining session threads.",e);+ serverCore.this.log.logFailure("Unexpected error while trying to shutdown all remaining session threads.",e);}super.close();@@ -733,7 +733,7 @@ public final class serverCore extends serverAbstractThread implements serverThre*/public void log(boolean outgoing, String request) {- serverCore.this.log.logDebug(userAddress.getHostAddress() + "/" + this.identity + " " ++ serverCore.this.log.logFine(userAddress.getHostAddress() + "/" + this.identity + " " +"[" + ((serverCore.this.theSessionPool.isClosed)? -1 : serverCore.this.theSessionPool.getNumActive()) + ", " + this.commandCounter +((outgoing) ? "] > " : "] < ") +request);@@ -1016,10 +1016,10 @@ public final class serverCore extends serverAbstractThread implements serverThrereturn readLineBuffer.toByteArray();} catch (ClosedByInterruptException e) {- if (logerr) serverLog.logError("SERVER", "receive interrupted - timeout");+ if (logerr) serverLog.logFailure("SERVER", "receive interrupted - timeout");return null;} catch (IOException e) {- if (logerr) serverLog.logError("SERVER", "receive interrupted - exception 2 = " + e.getMessage());+ if (logerr) serverLog.logFailure("SERVER", "receive interrupted - exception 2 = " + e.getMessage());return null;}}diff --git a/source/de/anomic/server/serverInstantThread.java b/source/de/anomic/server/serverInstantThread.javaindex 5952f1773..e24d5ff59 100644--- a/source/de/anomic/server/serverInstantThread.java+++ b/source/de/anomic/server/serverInstantThread.java@@ -84,7 +84,7 @@ public final class serverInstantThread extends serverAbstractThread implements s} catch (IllegalArgumentException e) {return -1;} catch (InvocationTargetException e) {- serverLog.logError("SERVER", "invocation serverInstantThread of thread '" + this.getName() + "': " + e.getMessage(), e);+ serverLog.logFailure("SERVER", "invocation serverInstantThread of thread '" + this.getName() + "': " + e.getMessage(), e);return -1;}}@@ -96,15 +96,15 @@ public final class serverInstantThread extends serverAbstractThread implements sif (result == null) jobHasDoneSomething = true;else if (result instanceof Boolean) jobHasDoneSomething = ((Boolean) result).booleanValue();} catch (IllegalAccessException e) {- serverLog.logError("SERVER", "Internal Error in serverInstantThread: " + e.getMessage());- serverLog.logError("SERVER", "shutting down thread '" + this.getName() + "'");+ serverLog.logFailure("SERVER", "Internal Error in serverInstantThread: " + e.getMessage());+ serverLog.logFailure("SERVER", "shutting down thread '" + this.getName() + "'");this.terminate(false);} catch (IllegalArgumentException e) {- serverLog.logError("SERVER", "Internal Error in serverInstantThread: " + e.getMessage());- serverLog.logError("SERVER", "shutting down thread '" + this.getName() + "'");+ serverLog.logFailure("SERVER", "Internal Error in serverInstantThread: " + e.getMessage());+ serverLog.logFailure("SERVER", "shutting down thread '" + this.getName() + "'");this.terminate(false);} catch (InvocationTargetException e) {- serverLog.logError("SERVER", "Runtime Error in serverInstantThread, thread '" + this.getName() + "': " + e.getMessage(), e);+ serverLog.logFailure("SERVER", "Runtime Error in serverInstantThread, thread '" + this.getName() + "': " + e.getMessage(), e);}return jobHasDoneSomething;}diff --git a/source/de/anomic/server/serverPortForwardingSch.java b/source/de/anomic/server/serverPortForwardingSch.javaindex 877577f69..be3c30520 100644--- a/source/de/anomic/server/serverPortForwardingSch.java+++ b/source/de/anomic/server/serverPortForwardingSch.java@@ -60,7 +60,7 @@ public class serverPortForwardingSch implements serverPortForwarding{int localPort) throws Exception {try {- this.log.logDebug("Initializing port forwarding via sch ...");+ this.log.logFine("Initializing port forwarding via sch ...");this.switchboard = switchboard;@@ -139,7 +139,7 @@ public class serverPortForwardingSch implements serverPortForwarding{// using a timer task to control if the session remains openif (sessionWatcher == null) {- this.log.logDebug("Deploying port forwarding session watcher thread.");+ this.log.logFine("Deploying port forwarding session watcher thread.");this.switchboard.deployThread("portForwardingWatcher", "Remote Port Forwarding Watcher", "this thread is used to detect broken connections and to re-establish it if necessary.", null,sessionWatcher = new serverInstantThread(this, "reconnect", null), 30000,30000,30000,1000);sessionWatcher.setSyncObject(new Object());@@ -150,14 +150,14 @@ public class serverPortForwardingSch implements serverPortForwarding{this.localHost + ":" + this.localHostPort);}catch(Exception e){- this.log.logError("Unable to connect to remote port forwarding host.",e);+ this.log.logFailure("Unable to connect to remote port forwarding host.",e);throw new IOException(e.getMessage());}}public synchronized boolean reconnect() throws IOException {if ((!this.isConnected()) && (!Thread.currentThread().isInterrupted())) {- this.log.logDebug("Trying to reconnect to port forwarding host.");+ this.log.logFine("Trying to reconnect to port forwarding host.");this.connect();return this.isConnected();}@@ -168,16 +168,16 @@ public class serverPortForwardingSch implements serverPortForwarding{if (session == null) throw new IOException("No connection established.");// terminating port watcher thread- this.log.logDebug("Terminating port forwarding session watcher thread.");+ this.log.logFine("Terminating port forwarding session watcher thread.");this.switchboard.terminateThread("portForwardingWatcher",true);sessionWatcher = null;// disconnection the sessiontry {session.disconnect();- this.log.logDebug("Successfully disconnected from port forwarding host.");+ this.log.logFine("Successfully disconnected from port forwarding host.");} catch (Exception e) {- this.log.logError("Error while trying to disconnect from port forwarding host.",e);+ this.log.logFailure("Error while trying to disconnect from port forwarding host.",e);throw new IOException(e.getMessage());}}diff --git a/source/de/anomic/yacy/yacyClient.java b/source/de/anomic/yacy/yacyClient.javaindex bb4f7233c..94cdbeaa5 100644--- a/source/de/anomic/yacy/yacyClient.java+++ b/source/de/anomic/yacy/yacyClient.java@@ -112,14 +112,14 @@ public class yacyClient {obj));} catch (Exception e) {if (Thread.currentThread().isInterrupted()) {- yacyCore.log.logDebug("yacyClient.publishMySeed thread '" + Thread.currentThread().getName() + "' interrupted.");+ yacyCore.log.logFine("yacyClient.publishMySeed thread '" + Thread.currentThread().getName() + "' interrupted.");} else {- yacyCore.log.logDebug("yacyClient.publishMySeed exception:" + e.getMessage());+ yacyCore.log.logFine("yacyClient.publishMySeed exception:" + e.getMessage());}return -1;}if ((result == null) || (result.size() < 3)) {- yacyCore.log.logDebug("yacyClient.publishMySeed result error: " ++ yacyCore.log.logFine("yacyClient.publishMySeed result error: " +((result == null) ? "result null" : ("result=" + result.toString())));return -1;}@@ -132,7 +132,7 @@ public class yacyClient {if ((otherHash != null ) && (otherHash.length() > 0)) {otherPeer = yacySeed.genRemoteSeed((String) result.get("seed0"), key, remoteTime);if ((otherPeer == null) || (!(otherPeer.hash.equals(otherHash)))) {- yacyCore.log.logDebug("yacyClient.publishMySeed: consistency error: other peer '" + ((otherPeer==null)?"unknown":otherPeer.getName()) + "' wrong");+ yacyCore.log.logFine("yacyClient.publishMySeed: consistency error: other peer '" + ((otherPeer==null)?"unknown":otherPeer.getName()) + "' wrong");return -1; // no success}otherPeerVersion = otherPeer.getVersion();@@ -186,7 +186,7 @@ public class yacyClient {}}} else {- yacyCore.log.logDebug("yacyClient.publishMySeed: Peer '" + ((otherPeer==null)?"unknown":otherPeer.getName()) + "' reported us as " + mytype + ".");+ yacyCore.log.logFine("yacyClient.publishMySeed: Peer '" + ((otherPeer==null)?"unknown":otherPeer.getName()) + "' reported us as " + mytype + ".");}yacyCore.seedDB.mySeed.put(yacySeed.PEERTYPE, mytype);}@@ -194,7 +194,7 @@ public class yacyClient {String error;if ((error = yacyCore.seedDB.mySeed.isProper()) != null) {yacyCore.seedDB.mySeed = mySeedBkp;- yacyCore.log.logDebug("yacyClient.publishMySeed mySeed error - not proper: " + error);+ yacyCore.log.logFine("yacyClient.publishMySeed mySeed error - not proper: " + error);return -1;}@@ -224,7 +224,7 @@ public class yacyClient {Date remoteTime = yacyCore.parseUniversalDate((String) result.get("mytime")); // read remote timereturn yacySeed.genRemoteSeed((String) result.get("response"), key, remoteTime);} catch (Exception e) {- yacyCore.log.logError("yacyClient.querySeed error:" + e.getMessage());+ yacyCore.log.logFailure("yacyClient.querySeed error:" + e.getMessage());return null;}}@@ -241,7 +241,7 @@ public class yacyClient {if ((result == null) || (result.size() == 0)) return -1;return Integer.parseInt((String) result.get("response"));} catch (Exception e) {- yacyCore.log.logError("yacyClient.queryRWICount error:" + e.getMessage());+ yacyCore.log.logFailure("yacyClient.queryRWICount error:" + e.getMessage());return -1;}}@@ -264,7 +264,7 @@ public class yacyClient {String resp = (String) result.get("response");if (resp == null) return -1; else return Integer.parseInt(resp);} catch (Exception e) {- yacyCore.log.logError("yacyClient.queryUrlCount error asking peer '" + target.getName() + "':" + e.toString());+ yacyCore.log.logFailure("yacyClient.queryUrlCount error asking peer '" + target.getName() + "':" + e.toString());return -1;}}@@ -382,10 +382,10 @@ public class yacyClient {} catch (NumberFormatException e) {searchtime = totalrequesttime;}- yacyCore.log.logDebug("yacyClient.search: processed " + results + " links from peer " + targetPeer.hash + ", score=" + targetPeer.selectscore + ", DHTdist=" + yacyDHTAction.dhtDistance(targetPeer.hash, wordhashes) + ", duetime=" + duetime + ", searchtime=" + searchtime + ", netdelay=" + (totalrequesttime - searchtime) + ", references=" + result.get("references"));+ yacyCore.log.logFine("yacyClient.search: processed " + results + " links from peer " + targetPeer.hash + ", score=" + targetPeer.selectscore + ", DHTdist=" + yacyDHTAction.dhtDistance(targetPeer.hash, wordhashes) + ", duetime=" + duetime + ", searchtime=" + searchtime + ", netdelay=" + (totalrequesttime - searchtime) + ", references=" + result.get("references"));return results;} catch (Exception e) {- yacyCore.log.logError("yacyClient.search error: '" + targetPeer.get("Name", "anonymous") + "' failed - " + e);+ yacyCore.log.logFailure("yacyClient.search error: '" + targetPeer.get("Name", "anonymous") + "' failed - " + e);//e.printStackTrace();return 0;}@@ -419,7 +419,7 @@ public class yacyClient {8000, null, null, yacyCore.seedDB.sb.remoteProxyHost, yacyCore.seedDB.sb.remoteProxyPort, post));} catch (Exception e) {// most probably a network time-out exception- yacyCore.log.logError("yacyClient.permissionMessage error:" + e.getMessage());+ yacyCore.log.logFailure("yacyClient.permissionMessage error:" + e.getMessage());return null;}}@@ -448,7 +448,7 @@ public class yacyClient {//System.out.println("V=" + v.toString());return nxTools.table(v);} catch (Exception e) {- yacyCore.log.logError("yacyClient.postMessage error:" + e.getMessage());+ yacyCore.log.logFailure("yacyClient.postMessage error:" + e.getMessage());return null;}}@@ -480,7 +480,7 @@ public class yacyClient {10000, null, null, yacyCore.seedDB.sb.remoteProxyHost, yacyCore.seedDB.sb.remoteProxyPort, post));} catch (Exception e) {// most probably a network time-out exception- yacyCore.log.logError("yacyClient.crawlOrder error: peer=" + targetSeed.getName() + ", error=" + e.getMessage());+ yacyCore.log.logFailure("yacyClient.crawlOrder error: peer=" + targetSeed.getName() + ", error=" + e.getMessage());return null;}}@@ -538,7 +538,7 @@ public class yacyClient {60000, null, null, yacyCore.seedDB.sb.remoteProxyHost, yacyCore.seedDB.sb.remoteProxyPort));} catch (Exception e) {// most probably a network time-out exception- yacyCore.log.logError("yacyClient.crawlReceipt error:" + e.getMessage());+ yacyCore.log.logFailure("yacyClient.crawlReceipt error:" + e.getMessage());return null;}}@@ -621,7 +621,7 @@ public class yacyClient {HashMap result = nxTools.table(v);return result;} catch (Exception e) {- yacyCore.log.logError("yacyClient.transferRWI error:" + e.getMessage());+ yacyCore.log.logFailure("yacyClient.transferRWI error:" + e.getMessage());return null;}}@@ -656,7 +656,7 @@ public class yacyClient {}return nxTools.table(v);} catch (Exception e) {- yacyCore.log.logError("yacyClient.transferRWI error:" + e.getMessage());+ yacyCore.log.logFailure("yacyClient.transferRWI error:" + e.getMessage());return null;}}@@ -673,7 +673,7 @@ public class yacyClient {yacyCore.seedDB.sb.remoteProxyHost, yacyCore.seedDB.sb.remoteProxyPort, post);return nxTools.table(v);} catch (Exception e) {- yacyCore.log.logError("yacyClient.getProfile error:" + e.getMessage());+ yacyCore.log.logFailure("yacyClient.getProfile error:" + e.getMessage());return null;}}diff --git a/source/de/anomic/yacy/yacyCore.java b/source/de/anomic/yacy/yacyCore.javaindex fecb75ba6..094e026df 100644--- a/source/de/anomic/yacy/yacyCore.java+++ b/source/de/anomic/yacy/yacyCore.java@@ -155,7 +155,7 @@ public class yacyCore {// read memory amountint mem = Integer.parseInt(switchboard.getConfig("ramCacheDHT", "1024")) / 1024;- log.logSystem("DHT Cache memory = " + mem + " KB");+ log.logConfig("DHT Cache memory = " + mem + " KB");// create or init seed cacheseedDB = new yacySeedDB(@@ -183,7 +183,7 @@ public class yacyCore {lastSeedUpload_seedDBSize = seedDB.sizeConnected();- log.logSystem("CORE INITIALIZED");+ log.logConfig("CORE INITIALIZED");// ATTENTION, VERY IMPORTANT: before starting the thread, the httpd yacy server must be running!speedKey = System.currentTimeMillis() - time;@@ -196,12 +196,12 @@ public class yacyCore {// cycle// within cycle: update seed file, strengthen network, pass news (new, old seed's)if (online())- log.logSystem("you are in online mode");+ log.logConfig("you are in online mode");else {- log.logSystem("YOU ARE OFFLINE! ---");- log.logSystem("--- TO START BOOTSTRAPING, YOU MUST USE THE PROXY,");- log.logSystem("--- OR HIT THE BUTTON 'go online'");- log.logSystem("--- ON THE STATUS PAGE http://localhost:" + switchboard.getConfig("port", "8080") + "/Status.html");+ log.logConfig("YOU ARE OFFLINE! ---");+ log.logConfig("--- TO START BOOTSTRAPING, YOU MUST USE THE PROXY,");+ log.logConfig("--- OR HIT THE BUTTON 'go online'");+ log.logConfig("--- ON THE STATUS PAGE http://localhost:" + switchboard.getConfig("port", "8080") + "/Status.html");}}@@ -223,7 +223,7 @@ public class yacyCore {public void publishSeedList() {- log.logDebug("yacyCore.publishSeedList: Triggered Seed Publish");+ log.logFine("yacyCore.publishSeedList: Triggered Seed Publish");/*if (oldIPStamp.equals((String) seedDB.mySeed.get("IP", "127.0.0.1")))@@ -241,7 +241,7 @@ public class yacyCore {(System.currentTimeMillis() - this.lastSeedUpload_timeStamp < 1000*60*60*24) &&(seedDB.mySeed.isPrincipal())) {- log.logDebug("yacyCore.publishSeedList: not necessary to publish: oldIP is equal, sizeConnected is equal and I can reach myself under the old IP.");+ log.logFine("yacyCore.publishSeedList: not necessary to publish: oldIP is equal, sizeConnected is equal and I can reach myself under the old IP.");return;}@@ -263,7 +263,7 @@ public class yacyCore {saveSeedList();} else {if (seedUploadMethod.equals("")) this.switchboard.setConfig("seedUploadMethod","none");- log.logDebug("yacyCore.publishSeedList: No uploading method configured");+ log.logFine("yacyCore.publishSeedList: No uploading method configured");return;}@@ -337,7 +337,7 @@ public class yacyCore {log.logInfo("publish: handshaked " + this.seed.get("PeerType", "senior") + " peer '" + this.seed.getName() + "' at " + this.seed.getAddress());}} catch (Exception e) {- log.logError("publishThread: error with target seed " + seed.getMap() + ": " + e.getMessage(), e);+ log.logFailure("publishThread: error with target seed " + seed.getMap() + ": " + e.getMessage(), e);this.error = e;} finally {this.syncList.add(this);@@ -387,7 +387,7 @@ public class yacyCore {elseseedDB.mySeed.put("news", de.anomic.tools.crypt.simpleEncode(record.toString()));} catch (IOException e) {- log.logError("publishMySeed: problem with news encoding", e);+ log.logFailure("publishMySeed: problem with news encoding", e);}// holding a reference to all started threads@@ -400,7 +400,7 @@ public class yacyCore {if (seeds[i] == null) continue;String address = seeds[i].getAddress();- log.logDebug("HELLO #" + i + " to peer '" + seeds[i].get("Name", "") + "' at " + address); // debug+ log.logFine("HELLO #" + i + " to peer '" + seeds[i].get("Name", "") + "' at " + address); // debugif ((address == null) || (seeds[i].isProper() != null)) {// we don't like that address, delete itpeerActions.peerDeparture(seeds[i]);@@ -500,23 +500,23 @@ public class yacyCore {threadCount = yacyCore.publishThreadGroup.enumerate(threadList);// we need to use a timeout here because of missing interruptable session threads ...- log.logDebug("publish: Trying to abort " + yacyCore.publishThreadGroup.activeCount() + " remaining publishing threads ...");+ log.logFine("publish: Trying to abort " + yacyCore.publishThreadGroup.activeCount() + " remaining publishing threads ...");for ( int currentThreadIdx = 0; currentThreadIdx < threadCount; currentThreadIdx++ ) {Thread currentThread = threadList[currentThreadIdx];if (currentThread.isAlive()) {- log.logDebug("publish: Closing socket of publishing thread '" + currentThread.getName() + "' [" + currentThreadIdx + "].");+ log.logFine("publish: Closing socket of publishing thread '" + currentThread.getName() + "' [" + currentThreadIdx + "].");httpc.closeOpenSockets(currentThread);}}// we need to use a timeout here because of missing interruptable session threads ...- log.logDebug("publish: Waiting for " + yacyCore.publishThreadGroup.activeCount() + " remaining publishing threads to finish shutdown ...");+ log.logFine("publish: Waiting for " + yacyCore.publishThreadGroup.activeCount() + " remaining publishing threads to finish shutdown ...");for ( int currentThreadIdx = 0; currentThreadIdx < threadCount; currentThreadIdx++ ) {Thread currentThread = threadList[currentThreadIdx];if (currentThread.isAlive()) {- log.logDebug("publish: Waiting for remaining publishing thread '" + currentThread.getName() + "' to finish shutdown");+ log.logFine("publish: Waiting for remaining publishing thread '" + currentThread.getName() + "' to finish shutdown");try { currentThread.join(500); }catch (InterruptedException ex) {}}}@@ -683,7 +683,7 @@ public class yacyCore {try {seedDB.mySeed.put("PeerType", "principal"); // this information shall also be uploaded- log.logDebug("SaveSeedList: Using seed uploading method '" + seedUploadMethod + "' for seed-list uploading." ++ log.logFine("SaveSeedList: Using seed uploading method '" + seedUploadMethod + "' for seed-list uploading." +"\n\tPrevious peerType is '" + seedDB.mySeed.get("PeerType", "junior") + "'.");//logt = seedDB.uploadCache(seedFTPServer, seedFTPAccount, seedFTPPassword, seedFTPPath, seedURL);@@ -692,7 +692,7 @@ public class yacyCore {if (logt.indexOf("Error") >= 0) {seedDB.mySeed.put("PeerType", prevStatus);String errorMsg = "SaveSeedList: seed upload failed using " + uploader.getClass().getName() + " (error): " + logt.substring(logt.indexOf("Error") + 6);- log.logError(errorMsg);+ log.logFailure(errorMsg);return errorMsg;}log.logInfo(logt);diff --git a/source/de/anomic/yacy/yacyDHTAction.java b/source/de/anomic/yacy/yacyDHTAction.javaindex 0bb429599..117425b67 100644--- a/source/de/anomic/yacy/yacyDHTAction.java+++ b/source/de/anomic/yacy/yacyDHTAction.java@@ -137,7 +137,7 @@ public class yacyDHTAction implements yacyPeerAction {if (s.getFlagAcceptRemoteIndex()) return s;}} catch (kelondroException e) {- yacyCore.log.logError("database inconsistency (" + e.getMessage() + "), re-set of db.");+ yacyCore.log.logFailure("database inconsistency (" + e.getMessage() + "), re-set of db.");seedDB.resetActiveTable();return null;}diff --git a/source/de/anomic/yacy/yacyNewsAction.java b/source/de/anomic/yacy/yacyNewsAction.javaindex 1ffdaa8ee..65f2a5eb1 100644--- a/source/de/anomic/yacy/yacyNewsAction.java+++ b/source/de/anomic/yacy/yacyNewsAction.java@@ -70,7 +70,7 @@ public class yacyNewsAction implements yacyPeerAction {try {synchronized (pool) {this.pool.enqueueIncomingNews(record);}} catch (IOException e) {- serverLog.logError("YACY", "processPeerArrival", e);+ serverLog.logFailure("YACY", "processPeerArrival", e);}}diff --git a/source/de/anomic/yacy/yacyPeerActions.java b/source/de/anomic/yacy/yacyPeerActions.javaindex dce81dc96..7ac3a5913 100644--- a/source/de/anomic/yacy/yacyPeerActions.java+++ b/source/de/anomic/yacy/yacyPeerActions.java@@ -184,7 +184,7 @@ public class yacyPeerActions {} catch (Exception e) {// this is when wget fails; may be because of missing internet connection// we do nothing here and go silently over it- yacyCore.log.logError("BOOTSTRAP: failed to load seeds from seed-list URL " + seedListFileURL);+ yacyCore.log.logFailure("BOOTSTRAP: failed to load seeds from seed-list URL " + seedListFileURL);}}}@@ -242,10 +242,10 @@ public class yacyPeerActions {// returns true if the peer is new and previously unknownString error;if (seed == null) {- yacyCore.log.logError("connect: WRONG seed (NULL)");+ yacyCore.log.logFailure("connect: WRONG seed (NULL)");return false;} else if ((error = seed.isProper()) != null) {- yacyCore.log.logError("connect: WRONG seed (" + seed.getName() + "/" + seed.hash + "): " + error);+ yacyCore.log.logFailure("connect: WRONG seed (" + seed.getName() + "/" + seed.hash + "): " + error);return false;} else if ((seedDB.mySeed != null) && (seed.hash.equals(seedDB.mySeed.hash))) {yacyCore.log.logInfo("connect: SELF reference " + seed.getAddress());@@ -254,7 +254,7 @@ public class yacyPeerActions {String peerType = seed.get("PeerType", "virgin");// reject unqualified seedsif ((peerType.equals("virgin")) || (peerType.equals("junior"))) {- yacyCore.log.logDebug("connect: rejecting NOT QUALIFIED " + peerType + " seed " + seed.getName());+ yacyCore.log.logFine("connect: rejecting NOT QUALIFIED " + peerType + " seed " + seed.getName());return false;}@@ -281,7 +281,7 @@ public class yacyPeerActions {if (Math.abs(yacyCore.universalTime() - ctime) > 3600000) {// the new connection is out-of-age, we reject the connection- yacyCore.log.logDebug("connect: rejecting out-dated peer '" + seed.getName() + "' from " + seed.getAddress());+ yacyCore.log.logFine("connect: rejecting out-dated peer '" + seed.getName() + "' from " + seed.getAddress());return false;}@@ -318,13 +318,13 @@ public class yacyPeerActions {if (!(direct)) {if (ctime < dtime) {// the disconnection was later, we reject the connection- yacyCore.log.logDebug("connect: rejecting disconnected peer '" + seed.getName() + "' from " + seed.getAddress());+ yacyCore.log.logFine("connect: rejecting disconnected peer '" + seed.getName() + "' from " + seed.getAddress());return false;}}// this is a return of a lost peer- yacyCore.log.logDebug("connect: returned KNOWN " + peerType + " peer '" + seed.getName() + "' from " + seed.getAddress());+ yacyCore.log.logFine("connect: returned KNOWN " + peerType + " peer '" + seed.getName() + "' from " + seed.getAddress());seedDB.addConnected(seed);return true;} else {@@ -334,21 +334,21 @@ public class yacyPeerActions {try {// if the old LastSeen date is later then the other info, then we reject the infoif ((ctime < yacyCore.shortFormatter.parse(connectedSeed.get("LastSeen", "20040101000000")).getTime()) && (!(direct))) {- yacyCore.log.logDebug("connect: rejecting old info about peer '" + seed.getName() + "'");+ yacyCore.log.logFine("connect: rejecting old info about peer '" + seed.getName() + "'");return false;}} catch (java.text.ParseException e) {}- yacyCore.log.logDebug("connect: updated KNOWN " + ((direct) ? "direct " : "") + peerType + " peer '" + seed.getName() + "' from " + seed.getAddress());+ yacyCore.log.logFine("connect: updated KNOWN " + ((direct) ? "direct " : "") + peerType + " peer '" + seed.getName() + "' from " + seed.getAddress());seedDB.addConnected(seed);return true;} else {// the seed is newif (((String) seed.get("IP", "127.0.0.1")).equals((String) seedDB.mySeed.get("IP", "127.0.0.1"))) {// seed from the same IP as the calling client: can be the case if there runs another one over a NAT- yacyCore.log.logDebug("connect: saved NEW seed (myself IP) " + seed.getAddress());+ yacyCore.log.logFine("connect: saved NEW seed (myself IP) " + seed.getAddress());} else {// completely new seed- yacyCore.log.logDebug("connect: saved NEW " + peerType + " peer '" + seed.getName() + "' from " + seed.getAddress());+ yacyCore.log.logFine("connect: saved NEW " + peerType + " peer '" + seed.getName() + "' from " + seed.getAddress());}if (peerType.equals("senior")) seniorConnects++; // update statisticsif (peerType.equals("principal")) principalConnects++; // update statistics@@ -362,7 +362,7 @@ public class yacyPeerActions {synchronized public void disconnectPeer(yacySeed seed) {// we do this if we did not get contact with the other peer- yacyCore.log.logDebug("connect: no contact to a " + seed.get("PeerType", "virgin") + " peer '" + seed.getName() + "' at " + seed.getAddress());+ yacyCore.log.logFine("connect: no contact to a " + seed.get("PeerType", "virgin") + " peer '" + seed.getName() + "' at " + seed.getAddress());if (!(seedDB.hasDisconnected(seed.hash))) disconnects++;seed.put("disconnected", yacyCore.universalDateShortString());seedDB.addDisconnected(seed); // update infodiff --git a/source/de/anomic/yacy/yacySearch.java b/source/de/anomic/yacy/yacySearch.javaindex 08bda1d96..4dc32b353 100644--- a/source/de/anomic/yacy/yacySearch.java+++ b/source/de/anomic/yacy/yacySearch.java@@ -125,7 +125,7 @@ public class yacySearch extends Thread {if (seed == null) continue;distance = yacyDHTAction.dhtDistance(seed.hash, wordhash);if (distance > 0.9) continue; // catch bug in peer selection- serverLog.logDebug("PLASMA", "selectPeers/DHTorder: " + seed.hash + ":" + seed.getName() + "/" + distance + " for wordhash " + wordhash + ", score " + c);+ serverLog.logFine("PLASMA", "selectPeers/DHTorder: " + seed.hash + ":" + seed.getName() + "/" + distance + " for wordhash " + wordhash + ", score " + c);ranking.addScore(seed.hash, c--);seeds.put(seed.hash, seed);}@@ -140,7 +140,7 @@ public class yacySearch extends Thread {seed = (yacySeed) dhtEnum.nextElement();if (seed == null) continue;score = (int) Math.round(Math.random() * ((c / 3) + 3));- serverLog.logDebug("PLASMA", "selectPeers/RWIcount: " + seed.hash + ":" + seed.getName() + ", RWIcount=" + seed.getMap().get("ICount") + ", score " + score);+ serverLog.logFine("PLASMA", "selectPeers/RWIcount: " + seed.hash + ":" + seed.getName() + ", RWIcount=" + seed.getMap().get("ICount") + ", score " + score);ranking.addScore(seed.hash, score);seeds.put(seed.hash, seed);c--;@@ -154,7 +154,7 @@ public class yacySearch extends Thread {while ((e.hasNext()) && (c < result.length)) {seed = (yacySeed) seeds.get((String) e.next());seed.selectscore = c;- serverLog.logDebug("PLASMA", "selectPeers/_lineup_: " + seed.hash + ":" + seed.getName() + " is choice " + c);+ serverLog.logFine("PLASMA", "selectPeers/_lineup_: " + seed.hash + ":" + seed.getName() + " is choice " + c);result[c++] = seed;}@@ -203,7 +203,7 @@ public class yacySearch extends Thread {if (searchThreads[i].links() < 0) anyIdle = true; else c = c + searchThreads[i].links();}if ((c >= count * 3) && ((System.currentTimeMillis() - start) > (waitingtime * 2 / 3))) {- yacyCore.log.logDebug("DEBUG yacySearch: c=" + c + ", count=" + count + ", waitingtime=" + waitingtime);+ yacyCore.log.logFine("DEBUG yacySearch: c=" + c + ", count=" + count + ", waitingtime=" + waitingtime);break; // we have enough}if (c >= count * 5) break;diff --git a/source/de/anomic/yacy/yacySeedDB.java b/source/de/anomic/yacy/yacySeedDB.javaindex 24fa15f9b..98e5b6a40 100644--- a/source/de/anomic/yacy/yacySeedDB.java+++ b/source/de/anomic/yacy/yacySeedDB.java@@ -166,14 +166,14 @@ public class yacySeedDB {private synchronized kelondroMap resetSeedTable(kelondroMap seedDB, File seedDBFile) {// this is an emergency function that should only be used if any problem with the// seed.db is detected- yacyCore.log.logDebug("seed-db " + seedDBFile.toString() + " reset (on-the-fly)");+ yacyCore.log.logFine("seed-db " + seedDBFile.toString() + " reset (on-the-fly)");try {seedDB.close();seedDBFile.delete();// create new seed databaseseedDB = openSeedTable(seedDBFile);} catch (IOException e) {- yacyCore.log.logDebug("resetSeedTable", e);+ yacyCore.log.logFine("resetSeedTable", e);}return seedDB;}@@ -187,7 +187,7 @@ public class yacySeedDB {seedActiveDB.close();seedPassiveDB.close();} catch (IOException e) {- yacyCore.log.logDebug("close", e);+ yacyCore.log.logFine("close", e);}}@@ -233,7 +233,7 @@ public class yacySeedDB {try {keyIt = seedActiveDB.keys(true, false); // iteration of String - Objects} catch (IOException e) {- yacyCore.log.logError("yacySeedCache.anySeed: seed.db not available: " + e.getMessage());+ yacyCore.log.logFailure("yacySeedCache.anySeed: seed.db not available: " + e.getMessage());keyIt = (new HashSet()).iterator();}String seedHash;@@ -300,7 +300,7 @@ public class yacySeedDB {return result;} catch (kelondroException e) {seedActiveDB = resetSeedTable(seedActiveDB, seedActiveDBFile);- yacyCore.log.logDebug("Internal Error at yacySeedDB.seedsByAge: " + e.getMessage(), e);+ yacyCore.log.logFine("Internal Error at yacySeedDB.seedsByAge: " + e.getMessage(), e);return null;}}@@ -349,13 +349,13 @@ public class yacySeedDB {seedPassiveDB.remove(seed.hash);seedPotentialDB.remove(seed.hash);} catch (IOException e){- yacyCore.log.logDebug("ERROR add: seed.db corrupt (" + e.getMessage() + "); resetting seed.db", e);+ yacyCore.log.logFine("ERROR add: seed.db corrupt (" + e.getMessage() + "); resetting seed.db", e);seedActiveDB = resetSeedTable(seedActiveDB, seedActiveDBFile);} catch (kelondroException e){- yacyCore.log.logDebug("ERROR add: seed.db corrupt (" + e.getMessage() + "); resetting seed.db", e);+ yacyCore.log.logFine("ERROR add: seed.db corrupt (" + e.getMessage() + "); resetting seed.db", e);seedActiveDB = resetSeedTable(seedActiveDB, seedActiveDBFile);} catch (IllegalArgumentException e) {- yacyCore.log.logDebug("ERROR add: seed.db corrupt (" + e.getMessage() + "); resetting seed.db", e);+ yacyCore.log.logFine("ERROR add: seed.db corrupt (" + e.getMessage() + "); resetting seed.db", e);seedActiveDB = resetSeedTable(seedActiveDB, seedActiveDBFile);}}@@ -371,13 +371,13 @@ public class yacySeedDB {try {seedPassiveDB.set(seed.hash, seed.getMap());} catch (IOException e) {- yacyCore.log.logDebug("ERROR add: seed.db corrupt (" + e.getMessage() + "); resetting seed.db", e);+ yacyCore.log.logFine("ERROR add: seed.db corrupt (" + e.getMessage() + "); resetting seed.db", e);seedPassiveDB = resetSeedTable(seedPassiveDB, seedPassiveDBFile);} catch (kelondroException e) {- yacyCore.log.logDebug("ERROR add: seed.db corrupt (" + e.getMessage() + "); resetting seed.db", e);+ yacyCore.log.logFine("ERROR add: seed.db corrupt (" + e.getMessage() + "); resetting seed.db", e);seedPassiveDB = resetSeedTable(seedPassiveDB, seedPassiveDBFile);} catch (IllegalArgumentException e) {- yacyCore.log.logDebug("ERROR add: seed.db corrupt (" + e.getMessage() + "); resetting seed.db", e);+ yacyCore.log.logFine("ERROR add: seed.db corrupt (" + e.getMessage() + "); resetting seed.db", e);seedPassiveDB = resetSeedTable(seedPassiveDB, seedPassiveDBFile);}}@@ -394,13 +394,13 @@ public class yacySeedDB {try {seedPotentialDB.set(seed.hash, seed.getMap());} catch (IOException e) {- yacyCore.log.logDebug("ERROR add: seed.db corrupt (" + e.getMessage() + "); resetting seed.db", e);+ yacyCore.log.logFine("ERROR add: seed.db corrupt (" + e.getMessage() + "); resetting seed.db", e);seedPassiveDB = resetSeedTable(seedPassiveDB, seedPassiveDBFile);} catch (kelondroException e) {- yacyCore.log.logDebug("ERROR add: seed.db corrupt (" + e.getMessage() + "); resetting seed.db", e);+ yacyCore.log.logFine("ERROR add: seed.db corrupt (" + e.getMessage() + "); resetting seed.db", e);seedPassiveDB = resetSeedTable(seedPassiveDB, seedPassiveDBFile);} catch (IllegalArgumentException e) {- yacyCore.log.logDebug("ERROR add: seed.db corrupt (" + e.getMessage() + "); resetting seed.db", e);+ yacyCore.log.logFine("ERROR add: seed.db corrupt (" + e.getMessage() + "); resetting seed.db", e);seedPassiveDB = resetSeedTable(seedPassiveDB, seedPassiveDBFile);}}@@ -542,15 +542,15 @@ public class yacySeedDB {try {// create a seed file which for uploading ...seedFile = new File("seedFile.txt");- serverLog.logDebug("YACY","SaveSeedList: Storing seedlist into tempfile " + seedFile.toString());+ serverLog.logFine("YACY","SaveSeedList: Storing seedlist into tempfile " + seedFile.toString());Vector uv = storeCache(seedFile, true);// uploading the seed file- serverLog.logDebug("YACY","SaveSeedList: Trying to upload seed-file ...");+ serverLog.logFine("YACY","SaveSeedList: Trying to upload seed-file ...");log = uploader.uploadSeedFile(sb,seedDB,seedFile);// check also if the result can be retrieved again- serverLog.logDebug("YACY","SaveSeedList: Checking uploading success ...");+ serverLog.logFine("YACY","SaveSeedList: Checking uploading success ...");if (checkCache(uv, seedURL))log = log + "UPLOAD CHECK - Success: the result vectors are equal" + serverCore.crlfString;else {@@ -582,17 +582,17 @@ public class yacySeedDB {Vector check = httpc.wget(seedURL, 10000, null, null, sb.remoteProxyHost, sb.remoteProxyPort);if (check == null) {- serverLog.logDebug("YACY","SaveSeedList: Testing download failed ...");+ serverLog.logFine("YACY","SaveSeedList: Testing download failed ...");}if ((check == null) || (uv == null) || (uv.size() != check.size())) {- serverLog.logDebug("YACY","SaveSeedList: Local and uploades seed-list " ++ serverLog.logFine("YACY","SaveSeedList: Local and uploades seed-list " +"contains varying numbers of entries." +"\n\tLocal seed-list: " + uv.size() + " entries" +"\n\tRemote seed-list: " + check.size() + " enties");return false;} else {- serverLog.logDebug("YACY","SaveSeedList: Comparing local and uploades seed-list entries ...");+ serverLog.logFine("YACY","SaveSeedList: Comparing local and uploades seed-list entries ...");int i;for (i = 0; i < uv.size(); i++) {if (!(((String) uv.elementAt(i)).equals((String) check.elementAt(i)))) return false;@@ -656,12 +656,12 @@ public class yacySeedDB {it = (firstKey == null) ? database.maps(up, rot) : database.maps(up, rot, firstKey);nextSeed = internalNext();} catch (IOException e) {- yacyCore.log.logDebug("ERROR seedLinEnum: seed.db corrupt (" + e.getMessage() + "); resetting seed.db", e);+ yacyCore.log.logFine("ERROR seedLinEnum: seed.db corrupt (" + e.getMessage() + "); resetting seed.db", e);if (database == seedActiveDB) seedActiveDB = resetSeedTable(seedActiveDB, seedActiveDBFile);if (database == seedPassiveDB) seedPassiveDB = resetSeedTable(seedPassiveDB, seedPassiveDBFile);it = null;} catch (kelondroException e) {- yacyCore.log.logDebug("ERROR seedLinEnum: seed.db corrupt (" + e.getMessage() + "); resetting seed.db", e);+ yacyCore.log.logFine("ERROR seedLinEnum: seed.db corrupt (" + e.getMessage() + "); resetting seed.db", e);if (database == seedActiveDB) seedActiveDB = resetSeedTable(seedActiveDB, seedActiveDBFile);if (database == seedPassiveDB) seedPassiveDB = resetSeedTable(seedPassiveDB, seedPassiveDBFile);it = null;@@ -674,7 +674,7 @@ public class yacySeedDB {it = database.maps(up, field);nextSeed = internalNext();} catch (kelondroException e) {- yacyCore.log.logDebug("ERROR seedLinEnum: seed.db corrupt (" + e.getMessage() + "); resetting seed.db", e);+ yacyCore.log.logFine("ERROR seedLinEnum: seed.db corrupt (" + e.getMessage() + "); resetting seed.db", e);if (database == seedActiveDB) seedActiveDB = resetSeedTable(seedActiveDB, seedActiveDBFile);if (database == seedPassiveDB) seedPassiveDB = resetSeedTable(seedPassiveDB, seedPassiveDBFile);if (database == seedPotentialDB) seedPotentialDB = resetSeedTable(seedPotentialDB, seedPotentialDBFile);diff --git a/source/yacy.java b/source/yacy.javaindex c6dff22ac..2f69484c9 100644--- a/source/yacy.java+++ b/source/yacy.java@@ -190,11 +190,11 @@ public final class yacy {System.out.println("could not find logging properties in homePath=" + homePath);e.printStackTrace();}- serverLog.logSystem("STARTUP", copyright);- serverLog.logSystem("STARTUP", hline);+ serverLog.logConfig("STARTUP", copyright);+ serverLog.logConfig("STARTUP", hline);- serverLog.logSystem("STARTUP", "java version " + System.getProperty("java.version", "no-java-version"));- serverLog.logSystem("STARTUP", "Application Root Path: " + homePath.toString());+ serverLog.logConfig("STARTUP", "java version " + System.getProperty("java.version", "no-java-version"));+ serverLog.logConfig("STARTUP", "Application Root Path: " + homePath.toString());// create data folderFile dataFolder = new File(homePath, "DATA");@@ -240,7 +240,7 @@ public final class yacy {sb.setConfig("vdate", vDATE);sb.setConfig("applicationRoot", homePath);sb.setConfig("startupTime", Long.toString(startup));- serverLog.logSystem("STARTUP", "YACY Version: " + version + ", Built " + vDATE);+ serverLog.logConfig("STARTUP", "YACY Version: " + version + ", Built " + vDATE);yacyCore.latestVersion = (float) version;// read environment@@ -377,7 +377,7 @@ public final class yacy {}serverLog.logInfo("STARTUP", "Copied the default lokales to DATA/LOCALE");}catch(NullPointerException e){- serverLog.logError("STARTUP", "Nullpointer Exception while copying the default Locales");+ serverLog.logFailure("STARTUP", "Nullpointer Exception while copying the default Locales");}//regenerate Locales from Translationlist, if needed@@ -410,7 +410,7 @@ public final class yacy {}// registering shutdown hook- serverLog.logSystem("STARTUP", "Registering Shutdown Hook");+ serverLog.logConfig("STARTUP", "Registering Shutdown Hook");Runtime run = Runtime.getRuntime();run.addShutdownHook(new shutdownHookThread(Thread.currentThread(), sb));@@ -418,35 +418,35 @@ public final class yacy {try {sb.waitForShutdown();} catch (Exception e) {- serverLog.logError("MAIN CONTROL LOOP", "PANIK: " + e.getMessage(),e);+ serverLog.logFailure("MAIN CONTROL LOOP", "PANIK: " + e.getMessage(),e);}// shut down- serverLog.logSystem("SHUTDOWN", "caught termination signal");+ serverLog.logConfig("SHUTDOWN", "caught termination signal");server.terminate(false);server.interrupt();if (server.isAlive()) try {httpc.wget(new URL("http://localhost:" + port), 1000, null, null, null, 0); // kick server- serverLog.logSystem("SHUTDOWN", "sent termination signal to server socket");+ serverLog.logConfig("SHUTDOWN", "sent termination signal to server socket");} catch (IOException ee) {- serverLog.logSystem("SHUTDOWN", "termination signal to server socket missed (server shutdown, ok)");+ serverLog.logConfig("SHUTDOWN", "termination signal to server socket missed (server shutdown, ok)");}// idle until the processes are downwhile (server.isAlive()) {Thread.currentThread().sleep(2000); // wait a while}- serverLog.logSystem("SHUTDOWN", "server has terminated");+ serverLog.logConfig("SHUTDOWN", "server has terminated");sb.close();}} catch (Exception e) {- serverLog.logError("STARTUP", "Unexpected Error: " + e.getClass().getName(),e);+ serverLog.logFailure("STARTUP", "Unexpected Error: " + e.getClass().getName(),e);//System.exit(1);}} catch (Exception ee) {serverLog.logFailure("STARTUP", "FATAL ERROR: " + ee.getMessage(),ee);}- serverLog.logSystem("SHUTDOWN", "goodbye. (this is the last line)");+ serverLog.logConfig("SHUTDOWN", "goodbye. (this is the last line)");try {System.exit(0);} catch (Exception e) {} // was once stopped by de.anomic.net.ftpc$sm.checkExit(ftpc.java:1790)@@ -463,12 +463,12 @@ public final class yacy {* @return Properties read from the configurationfile.*/private static Properties configuration(String mes, String homePath) {- serverLog.logSystem(mes, "Application Root Path: " + homePath.toString());+ serverLog.logConfig(mes, "Application Root Path: " + homePath.toString());// read data folderFile dataFolder = new File(homePath, "DATA");if (!(dataFolder.exists())) {- serverLog.logError(mes, "Application was never started or root path wrong.");+ serverLog.logFailure(mes, "Application was never started or root path wrong.");System.exit(-1);}@@ -476,10 +476,10 @@ public final class yacy {try {config.load(new FileInputStream(new File(homePath, "DATA/SETTINGS/httpProxy.conf")));} catch (FileNotFoundException e) {- serverLog.logError(mes, "could not find configuration file.");+ serverLog.logFailure(mes, "could not find configuration file.");System.exit(-1);} catch (IOException e) {- serverLog.logError(mes, "could not read configuration file.");+ serverLog.logFailure(mes, "could not read configuration file.");System.exit(-1);}@@ -515,23 +515,23 @@ public final class yacy {// read responseif (res.status.startsWith("2")) {- serverLog.logSystem("REMOTE-SHUTDOWN", "YACY accepted shutdown command.");- serverLog.logSystem("REMOTE-SHUTDOWN", "Stand by for termination, which may last some seconds.");+ serverLog.logConfig("REMOTE-SHUTDOWN", "YACY accepted shutdown command.");+ serverLog.logConfig("REMOTE-SHUTDOWN", "Stand by for termination, which may last some seconds.");ByteArrayOutputStream bos = new ByteArrayOutputStream();res.writeContent(bos, null);con.close();} else {- serverLog.logError("REMOTE-SHUTDOWN", "error response from YACY socket: " + res.status);+ serverLog.logFailure("REMOTE-SHUTDOWN", "error response from YACY socket: " + res.status);System.exit(-1);}} catch (IOException e) {- serverLog.logError("REMOTE-SHUTDOWN", "could not establish connection to YACY socket: " + e.getMessage());+ serverLog.logFailure("REMOTE-SHUTDOWN", "could not establish connection to YACY socket: " + e.getMessage());System.exit(-1);}// finished- serverLog.logSystem("REMOTE-SHUTDOWN", "SUCCESSFULLY FINISHED remote-shutdown:");- serverLog.logSystem("REMOTE-SHUTDOWN", "YACY will terminate after working off all enqueued tasks.");+ serverLog.logConfig("REMOTE-SHUTDOWN", "SUCCESSFULLY FINISHED remote-shutdown:");+ serverLog.logConfig("REMOTE-SHUTDOWN", "YACY will terminate after working off all enqueued tasks.");}/**@@ -580,7 +580,7 @@ public final class yacy {}// finished- serverLog.logSystem("GEN-WORDSTAT", "FINISHED");+ serverLog.logConfig("GEN-WORDSTAT", "FINISHED");}/**@@ -676,7 +676,7 @@ public final class yacy {// start upSystem.out.println(copyright);System.out.println(hline);- serverLog.logSystem("CLEAN-WORDLIST", "START");+ serverLog.logConfig("CLEAN-WORDLIST", "START");String word;TreeSet wordset = new TreeSet();@@ -708,12 +708,12 @@ public final class yacy {serverLog.logInfo("CLEAN-WORDLIST", "not necessary to change wordlist");}} catch (IOException e) {- serverLog.logError("CLEAN-WORDLIST", "ERROR: " + e.getMessage());+ serverLog.logFailure("CLEAN-WORDLIST", "ERROR: " + e.getMessage());System.exit(-1);}// finished- serverLog.logSystem("CLEAN-WORDLIST", "FINISHED");+ serverLog.logConfig("CLEAN-WORDLIST", "FINISHED");}/**@@ -726,7 +726,7 @@ public final class yacy {// start upSystem.out.println(copyright);System.out.println(hline);- serverLog.logSystem("DELETE-STOPWORDS", "START");+ serverLog.logConfig("DELETE-STOPWORDS", "START");Properties config = configuration("DELETE-STOPWORDS", homePath);File dbRoot = new File(homePath, config.getProperty("dbPath"));@@ -757,7 +757,7 @@ public final class yacy {serverLog.logInfo("DELETE-STOPWORDS", "TOTALS: deleted " + count + " indexes; " + (totalamount / 1024) + " kbytes");// finished- serverLog.logSystem("DELETE-STOPWORDS", "FINISHED");+ serverLog.logConfig("DELETE-STOPWORDS", "FINISHED");}/**@@ -823,7 +823,7 @@ class shutdownHookThread extends Thread {try {if (!this.sb.isTerminated()) {- serverLog.logSystem("SHUTDOWN","Shutdown via shutdown hook.");+ serverLog.logConfig("SHUTDOWN","Shutdown via shutdown hook.");// sending the yacy main thread a shutdown signalthis.sb.terminate();diff --git a/yacy.logging b/yacy.loggingindex ba16e3316..f2cb8cae2 100644--- a/yacy.logging+++ b/yacy.logging@@ -6,17 +6,16 @@# possible values are:# OFF no output at all# SEVERE system-level error, internal cause, critical and not fixeable (i.e. inconsistency)-# ERROR exceptional error, catcheable and non-critical (i.e. file error)# WARNING uncritical service failure, may require user activity (i.e. input required, wrong authorization)-# CONFIG regular system status information (i.e. start-up messages)# INFO regular action information (i.e. any httpd request URL)-# FINEST in-function status debug output+# CONFIG regular system status information (i.e. start-up messages)+# FINE in-function status debug outputPARSER.level = INFO-YACY.level = FINEST+YACY.level = FINEHTCACHE.level = INFOPLASMA.level = INFOSERVER.level = INFO-WORDMIGRATION.level = FINEST+WORDMIGRATION.level = FINE# List of global handlershandlers = java.util.logging.FileHandler,\