summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--htroot/ConfigNetwork_p.html2
-rw-r--r--source/de/anomic/crawler/Balancer.java4
-rw-r--r--source/de/anomic/search/ResultFetcher.java1
-rw-r--r--source/net/yacy/kelondro/logging/Log.java14
4 files changed, 15 insertions, 6 deletions
diff --git a/htroot/ConfigNetwork_p.html b/htroot/ConfigNetwork_p.html
index ed13a9243..efd45e15b 100644
--- a/htroot/ConfigNetwork_p.html
+++ b/htroot/ConfigNetwork_p.html
@@ -51,7 +51,7 @@
#(commitRobinsonWithRemoteIndexing)#::<div class="commit">This Robinson Mode switches remote indexing on, but limits targets to peers within the same cluster. Remote indexing requests from peers within the same cluster are accepted.</div>#(/commitRobinsonWithRemoteIndexing)#
#(commitRobinsonWithoutRemoteIndexing)#::<div class="commit">This Robinson Mode does not allow any remote indexing (neither requests remote indexing, nor accepts it).</div>#(/commitRobinsonWithoutRemoteIndexing)#
#(commitPasswordWarning)#::<div class="error">With this configuration it is not allowed to authentify automatically from localhost! Please open the <a href="ConfigAccounts_p.html">Account Configuration</a> and set a new password.</div>#(/commitPasswordWarning)#
- <form id="NetworkForm" method="post" action="ConfigNetwork_p.html" enctype="multipart/form-data" accept-charset="UTF-8">
+ <form name="NetworkForm" method="post" action="ConfigNetwork_p.html" enctype="multipart/form-data" accept-charset="UTF-8">
<fieldset>
<legend>
<label>Network and Domain Specification</label>
diff --git a/source/de/anomic/crawler/Balancer.java b/source/de/anomic/crawler/Balancer.java
index feb527bdd..6e8a229bc 100644
--- a/source/de/anomic/crawler/Balancer.java
+++ b/source/de/anomic/crawler/Balancer.java
@@ -363,13 +363,13 @@ public class Balancer {
//final int s = urlFileIndex.size();
Row.Entry rowEntry = (nexthash == null) ? null : urlFileIndex.remove(nexthash);
if (rowEntry == null) {
- System.out.println("*** rowEntry=null, nexthash=" + nexthash);
+ System.out.println("*** rowEntry=null, nexthash=" + new String(nexthash));
rowEntry = urlFileIndex.removeOne();
if (rowEntry == null) {
nexthash = null;
} else {
nexthash = rowEntry.getPrimaryKeyBytes();
- //System.out.println("*** rowEntry.getPrimaryKeyBytes()=" + nexthash);
+ //System.out.println("*** rowEntry.getPrimaryKeyBytes()=" + new String(nexthash));
}
}
diff --git a/source/de/anomic/search/ResultFetcher.java b/source/de/anomic/search/ResultFetcher.java
index 622bc9aeb..5703f7dfd 100644
--- a/source/de/anomic/search/ResultFetcher.java
+++ b/source/de/anomic/search/ResultFetcher.java
@@ -164,6 +164,7 @@ public class ResultFetcher {
// get next entry
page = rankedCache.takeURL(true, taketimeout);
+ //if (page == null) page = rankedCache.takeURL(false, taketimeout);
if (page == null) break;
if (failedURLs.has(page.hash())) continue;
diff --git a/source/net/yacy/kelondro/logging/Log.java b/source/net/yacy/kelondro/logging/Log.java
index ccd8bcf23..612602a28 100644
--- a/source/net/yacy/kelondro/logging/Log.java
+++ b/source/net/yacy/kelondro/logging/Log.java
@@ -364,10 +364,19 @@ public final class Log {
// generating the root logger
/*Logger logger =*/ Logger.getLogger("");
-// System.setOut(new PrintStream(new LoggerOutputStream(Logger.getLogger("STDOUT"), Level.FINEST)));
-// System.setErr(new PrintStream(new LoggerOutputStream(Logger.getLogger("STDERR"), Level.SEVERE)));
logRunnerThread = new logRunner();
logRunnerThread.start();
+
+ // redirect uncaught exceptions to logging
+ final Log exceptionLog = new Log("UNCAUGHT-EXCEPTION");
+ Thread.setDefaultUncaughtExceptionHandler(new Thread.UncaughtExceptionHandler(){
+ public void uncaughtException(final Thread t, final Throwable e) {
+ String msg = String.format("Thread %s: %s",t.getName(), e.getMessage());
+ exceptionLog.logWarning(msg);
+ System.err.print("Exception in thread \"" + t.getName() + "\" ");
+ e.printStackTrace(System.err);
+ }
+ });
} finally {
if (fileIn != null) try {fileIn.close();}catch(final Exception e){}
}
@@ -398,5 +407,4 @@ public final class Log {
for (int i = 0; i < alength; i++) if (a[astart + i] != 0) return false;
return true;
}
-
}