DS-542 Fixed SOLR log StatisticsImporter verbose mode to display the correct information about the line being processed, as opposed to previous entries value when it encounters a bot.

Issue #DS-542 - verbose output for stats-log-importer displays spurious city/country from previous committed entry

git-svn-id: http://scm.dspace.org/svn/repo/dspace/branches/dspace-1_6_x@4882 9c30dcfa-912a-0410-8fc2-9e0234be79fd
This commit is contained in:
Peter Dietz
2010-05-05 02:03:35 +00:00
parent c3f730bb4b
commit 2b51d2fbbf

View File

@@ -242,8 +242,6 @@ public class StatisticsImporter
data += ("ip addr = " + ip);
data += (", dns name = " + dns);
data += (", country = " + country);
data += (", city = " + city);
if ((dns.endsWith(".googlebot.com.")) ||
(dns.endsWith(".crawl.yahoo.net.")) ||
(dns.endsWith(".search.msn.com.")))
@@ -253,7 +251,6 @@ public class StatisticsImporter
searchengines++;
continue;
}
if (verbose) System.out.println(data);
// Get the geo information for the user
Location location;
@@ -264,6 +261,11 @@ public class StatisticsImporter
countryCode = location.countryCode;
longitude = location.longitude;
latitude = location.latitude;
if(verbose) {
data += (", country = " + country);
data += (", city = " + city);
System.out.println(data);
}
try {
continent = LocationUtils.getContinentCode(countryCode);
} catch (Exception e) {