mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-10 03:23:13 +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 += ("ip addr = " + ip);
|
||||||
data += (", dns name = " + dns);
|
data += (", dns name = " + dns);
|
||||||
data += (", country = " + country);
|
|
||||||
data += (", city = " + city);
|
|
||||||
if ((dns.endsWith(".googlebot.com.")) ||
|
if ((dns.endsWith(".googlebot.com.")) ||
|
||||||
(dns.endsWith(".crawl.yahoo.net.")) ||
|
(dns.endsWith(".crawl.yahoo.net.")) ||
|
||||||
(dns.endsWith(".search.msn.com.")))
|
(dns.endsWith(".search.msn.com.")))
|
||||||
@@ -253,7 +251,6 @@ public class StatisticsImporter
|
|||||||
searchengines++;
|
searchengines++;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (verbose) System.out.println(data);
|
|
||||||
|
|
||||||
// Get the geo information for the user
|
// Get the geo information for the user
|
||||||
Location location;
|
Location location;
|
||||||
@@ -264,6 +261,11 @@ public class StatisticsImporter
|
|||||||
countryCode = location.countryCode;
|
countryCode = location.countryCode;
|
||||||
longitude = location.longitude;
|
longitude = location.longitude;
|
||||||
latitude = location.latitude;
|
latitude = location.latitude;
|
||||||
|
if(verbose) {
|
||||||
|
data += (", country = " + country);
|
||||||
|
data += (", city = " + city);
|
||||||
|
System.out.println(data);
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
continent = LocationUtils.getContinentCode(countryCode);
|
continent = LocationUtils.getContinentCode(countryCode);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
Reference in New Issue
Block a user