You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nutch.apache.org by le...@apache.org on 2011/09/22 17:10:50 UTC
svn commit: r1174191 [3/3] - in /nutch/branches/branch-1.4: ./
src/java/org/apache/nutch/crawl/ src/java/org/apache/nutch/fetcher/
src/java/org/apache/nutch/indexer/ src/java/org/apache/nutch/indexer/solr/
src/java/org/apache/nutch/net/ src/java/org/ap...
Modified: nutch/branches/branch-1.4/src/plugin/urlnormalizer-regex/src/java/org/apache/nutch/net/urlnormalizer/regex/RegexURLNormalizer.java
URL: http://svn.apache.org/viewvc/nutch/branches/branch-1.4/src/plugin/urlnormalizer-regex/src/java/org/apache/nutch/net/urlnormalizer/regex/RegexURLNormalizer.java?rev=1174191&r1=1174190&r2=1174191&view=diff
==============================================================================
--- nutch/branches/branch-1.4/src/plugin/urlnormalizer-regex/src/java/org/apache/nutch/net/urlnormalizer/regex/RegexURLNormalizer.java (original)
+++ nutch/branches/branch-1.4/src/plugin/urlnormalizer-regex/src/java/org/apache/nutch/net/urlnormalizer/regex/RegexURLNormalizer.java Thu Sep 22 15:10:44 2011
@@ -32,8 +32,8 @@ import java.util.List;
import java.util.ArrayList;
import java.util.Iterator;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.conf.Configured;
@@ -63,7 +63,7 @@ import java.util.regex.*;
*/
public class RegexURLNormalizer extends Configured implements URLNormalizer {
- private static final Log LOG = LogFactory.getLog(RegexURLNormalizer.class);
+ private static final Logger LOG = LoggerFactory.getLogger(RegexURLNormalizer.class);
/**
* Class which holds a compiled pattern and its corresponding substition
@@ -211,8 +211,8 @@ public class RegexURLNormalizer extends
.parse(new InputSource(reader));
Element root = doc.getDocumentElement();
if ((!"regex-normalize".equals(root.getTagName()))
- && (LOG.isFatalEnabled())) {
- LOG.fatal("bad conf file: top-level element not <regex-normalize>");
+ && (LOG.isErrorEnabled())) {
+ LOG.error("bad conf file: top-level element not <regex-normalize>");
}
NodeList regexes = root.getChildNodes();
for (int i = 0; i < regexes.getLength(); i++) {
@@ -247,8 +247,8 @@ public class RegexURLNormalizer extends
}
}
} catch (Exception e) {
- if (LOG.isFatalEnabled()) {
- LOG.fatal("error parsing conf file: " + e);
+ if (LOG.isErrorEnabled()) {
+ LOG.error("error parsing conf file: " + e);
}
return EMPTY_RULES;
}
Modified: nutch/branches/branch-1.4/src/plugin/urlnormalizer-regex/src/test/org/apache/nutch/net/urlnormalizer/regex/TestRegexURLNormalizer.java
URL: http://svn.apache.org/viewvc/nutch/branches/branch-1.4/src/plugin/urlnormalizer-regex/src/test/org/apache/nutch/net/urlnormalizer/regex/TestRegexURLNormalizer.java?rev=1174191&r1=1174190&r2=1174191&view=diff
==============================================================================
--- nutch/branches/branch-1.4/src/plugin/urlnormalizer-regex/src/test/org/apache/nutch/net/urlnormalizer/regex/TestRegexURLNormalizer.java (original)
+++ nutch/branches/branch-1.4/src/plugin/urlnormalizer-regex/src/test/org/apache/nutch/net/urlnormalizer/regex/TestRegexURLNormalizer.java Thu Sep 22 15:10:44 2011
@@ -30,8 +30,8 @@ import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.apache.hadoop.conf.Configuration;
import org.apache.nutch.net.URLNormalizers;
/**
@@ -57,7 +57,7 @@ import junit.framework.TestCase;
/** Unit tests for RegexUrlNormalizer. */
public class TestRegexURLNormalizer extends TestCase {
- private static final Log LOG = LogFactory.getLog(TestRegexURLNormalizer.class);
+ private static final Logger LOG = LoggerFactory.getLogger(TestRegexURLNormalizer.class);
private RegexURLNormalizer normalizer;
private Configuration conf;
Modified: nutch/branches/branch-1.4/src/test/org/apache/nutch/crawl/CrawlDBTestUtil.java
URL: http://svn.apache.org/viewvc/nutch/branches/branch-1.4/src/test/org/apache/nutch/crawl/CrawlDBTestUtil.java?rev=1174191&r1=1174190&r2=1174191&view=diff
==============================================================================
--- nutch/branches/branch-1.4/src/test/org/apache/nutch/crawl/CrawlDBTestUtil.java (original)
+++ nutch/branches/branch-1.4/src/test/org/apache/nutch/crawl/CrawlDBTestUtil.java Thu Sep 22 15:10:44 2011
@@ -21,8 +21,8 @@ import java.net.UnknownHostException;
import java.util.Iterator;
import java.util.List;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.FSDataOutputStream;
import org.apache.hadoop.fs.FileSystem;
@@ -38,7 +38,7 @@ import org.mortbay.jetty.handler.Resourc
public class CrawlDBTestUtil {
- private static final Log LOG = LogFactory.getLog(CrawlDBTestUtil.class);
+ private static final Logger LOG = LoggerFactory.getLogger(CrawlDBTestUtil.class);
/**
* Creates synthetic crawldb