diff --git a/src/main/java/app/services/db/GraphService.java b/src/main/java/app/services/db/GraphService.java index 1fa0332..10b2ac5 100644 --- a/src/main/java/app/services/db/GraphService.java +++ b/src/main/java/app/services/db/GraphService.java @@ -127,7 +127,7 @@ public class GraphService { } public void fillCountryAndCity(GeoIPCountry geoIPCountry, GeoIPCity geoIPCity) { - this.countryAndCity = geoIPCountry.GetCountry(connect_ip) + "/" + geoIPCity.GetCity(countryAndCity); + this.countryAndCity = geoIPCountry.GetCountry(connect_ip) + "/" + geoIPCity.GetCity(connect_ip); } } diff --git a/src/main/java/app/services/io/readers/GeoIPCity.java b/src/main/java/app/services/io/readers/GeoIPCity.java index 5362cfe..0d3f07a 100644 --- a/src/main/java/app/services/io/readers/GeoIPCity.java +++ b/src/main/java/app/services/io/readers/GeoIPCity.java @@ -28,6 +28,7 @@ public class GeoIPCity extends BaseReader { try { return databaseReader.city(InetAddress.getByName(ip)).getCity().getName(); } catch (Exception e) { + logger.error("[IGNORING] Cannot fetch city of ip", e); return "Unknown"; } } diff --git a/src/main/java/app/services/io/readers/GeoIPCountry.java b/src/main/java/app/services/io/readers/GeoIPCountry.java index 6d7c731..405d2ae 100644 --- a/src/main/java/app/services/io/readers/GeoIPCountry.java +++ b/src/main/java/app/services/io/readers/GeoIPCountry.java @@ -28,6 +28,7 @@ public class GeoIPCountry extends BaseReader { try { return databaseReader.country(InetAddress.getByName(ip)).getCountry().getName(); } catch (Exception e) { + logger.error("[IGNORING] Cannot fetch country of ip"); return "Unknown"; } }