mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-07 18:14:26 +00:00
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:
@@ -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) {
|
||||
|
Reference in New Issue
Block a user