Skip to content

Commit

Permalink
*) More graceful logging output in crawler
Browse files Browse the repository at this point in the history
  • Loading branch information
theli committed Aug 10, 2005
1 parent 248c24b commit 89c9faa
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions source/de/anomic/plasma/plasmaCrawlWorker.java
Expand Up @@ -403,20 +403,25 @@ private static void load(
String errorMsg = e.getMessage();
if (errorMsg != null) {
if (e instanceof java.net.BindException) {
log.logWarning("BindException detected while trying to download content from '" + url.toString() +
log.logWarning("CRAWLER BindException detected while trying to download content from '" + url.toString() +
"'. Retrying request.");
retryCrawling = true;
} else if (errorMsg.indexOf("Corrupt GZIP trailer") >= 0) {
log.logWarning("Problems detected while receiving gzip encoded content from '" + url.toString() +
log.logWarning("CRAWLER Problems detected while receiving gzip encoded content from '" + url.toString() +
"'. Retrying request without using gzip content encoding.");
retryCrawling = true;
} else if (errorMsg.indexOf("Socket time-out: Read timed out") >= 0) {
log.logWarning("Read timeout while receiving content from '" + url.toString() +
log.logWarning("CRAWLER Read timeout while receiving content from '" + url.toString() +
"'. Retrying request.");
retryCrawling = true;
} else if (errorMsg.indexOf("Connection timed out") >= 0) {
log.logWarning("CRAWLER Connection timeout while receiving content from '" + url.toString() +
"'. Retrying request.");
retryCrawling = true;
} else if (errorMsg.indexOf("Connection refused") >= 0) {
log.logError("CRAWLER LOADER ERROR2 with URL=" + url.toString() + ": Connection refused");
log.logError("CRAWLER LOADER ERROR2 with URL=" + url.toString() + ": Connection refused");
}


if (retryCrawling) {
load(url,
Expand Down

0 comments on commit 89c9faa

Please sign in to comment.