From 2b51d2fbbfa0a87c9eb69b87dda1f6fd22e7c516 Mon Sep 17 00:00:00 2001 From: Peter Dietz Date: Wed, 5 May 2010 02:03:35 +0000 Subject: [PATCH] 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 --- .../org/dspace/statistics/util/StatisticsImporter.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/dspace-stats/src/main/java/org/dspace/statistics/util/StatisticsImporter.java b/dspace-stats/src/main/java/org/dspace/statistics/util/StatisticsImporter.java index cb797ef928..edff93e136 100644 --- a/dspace-stats/src/main/java/org/dspace/statistics/util/StatisticsImporter.java +++ b/dspace-stats/src/main/java/org/dspace/statistics/util/StatisticsImporter.java @@ -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) {