Revision: 3031 http://archive-access.svn.sourceforge.net/archive-access/?rev=3031&view=rev Author: bradtofel Date: 2010-04-09 02:02:57 +0000 (Fri, 09 Apr 2010) Log Message: ----------- LOGGING: reduced stacktrace output, upped info info log to a warning TWEAK: removed comments and some whitespace changes Modified Paths: -------------- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/accesscontrol/robotstxt/RobotExclusionFilter.java Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/accesscontrol/robotstxt/RobotExclusionFilter.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/accesscontrol/robotstxt/RobotExclusionFilter.java 2010-04-09 02:01:13 UTC (rev 3030) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/accesscontrol/robotstxt/RobotExclusionFilter.java 2010-04-09 02:02:57 UTC (rev 3031) @@ -61,12 +61,12 @@ */ public class RobotExclusionFilter extends ExclusionFilter { - private final static Logger LOGGER = Logger.getLogger(RobotExclusionFilter.class.getName()); - + private final static Logger LOGGER = + Logger.getLogger(RobotExclusionFilter.class.getName()); + private final static String HTTP_PREFIX = "http://"; private final static String ROBOT_SUFFIX = "/robots.txt"; - private static String WWWN_REGEX = "^www[0-9]+\\."; private final static Pattern WWWN_PATTERN = Pattern.compile(WWWN_REGEX); private LiveWebCache webCache = null; @@ -160,11 +160,7 @@ List<String> urlStrings = searchResultToRobotUrlStrings(host); Iterator<String> itr = urlStrings.iterator(); String firstUrlString = null; -// StringBuilder sb = new StringBuilder(); -// for(String ttt : urlStrings) { -// sb.append("RU(").append(ttt).append(")"); -// } -// LOGGER.info("RobotUrls for("+host+")"+sb.toString()); + // loop through them all. As soon as we get a response, store that // in the cache for the FIRST url we tried and return it.. // If we get no responses for any of the robot URLs, use "empty" rules, @@ -202,15 +198,13 @@ LOGGER.info("ROBOT: LiveDocumentNotAvailableException("+urlString+")"); } catch (MalformedURLException e) { - e.printStackTrace(); +// e.printStackTrace(); LOGGER.info("ROBOT: MalformedURLException("+urlString+")"); return null; } catch (IOException e) { - e.printStackTrace(System.err); - LOGGER.info("ROBOT: IOException("+urlString+"):"+e.getLocalizedMessage()); + LOGGER.warning("ROBOT: IOException("+urlString+"):"+e.getLocalizedMessage()); return null; } catch (LiveWebCacheUnavailableException e) { - e.printStackTrace(); LOGGER.info("ROBOT: LiveWebCacheUnavailableException("+urlString+")"); return null; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |