summaryrefslogtreecommitdiffstats
path: root/EssentialsGeoIP/src/net/ess3/geoip/EssentialsGeoIPPlayerListener.java
diff options
context:
space:
mode:
Diffstat (limited to 'EssentialsGeoIP/src/net/ess3/geoip/EssentialsGeoIPPlayerListener.java')
-rw-r--r--EssentialsGeoIP/src/net/ess3/geoip/EssentialsGeoIPPlayerListener.java17
1 files changed, 8 insertions, 9 deletions
diff --git a/EssentialsGeoIP/src/net/ess3/geoip/EssentialsGeoIPPlayerListener.java b/EssentialsGeoIP/src/net/ess3/geoip/EssentialsGeoIPPlayerListener.java
index 4936ad0ab..bfdb41292 100644
--- a/EssentialsGeoIP/src/net/ess3/geoip/EssentialsGeoIPPlayerListener.java
+++ b/EssentialsGeoIP/src/net/ess3/geoip/EssentialsGeoIPPlayerListener.java
@@ -27,7 +27,6 @@ import org.bukkit.plugin.Plugin;
public class EssentialsGeoIPPlayerListener implements Listener, IReload
{
private LookupService ls = null;
- private static final Logger LOGGER = Logger.getLogger("Minecraft");
private File databaseFile;
private final ConfigHolder config;
private final IEssentials ess;
@@ -127,7 +126,7 @@ public class EssentialsGeoIPPlayerListener implements Listener, IReload
}
else
{
- LOGGER.log(Level.SEVERE, _("Can't find GeoIP database!"));
+ ess.getLogger().log(Level.SEVERE, _("Can't find GeoIP database!"));
return;
}
}
@@ -137,7 +136,7 @@ public class EssentialsGeoIPPlayerListener implements Listener, IReload
}
catch (IOException ex)
{
- LOGGER.log(Level.SEVERE, _("Failed to read GeoIP database!"), ex);
+ ess.getLogger().log(Level.SEVERE, _("Failed to read GeoIP database!"), ex);
}
}
@@ -145,7 +144,7 @@ public class EssentialsGeoIPPlayerListener implements Listener, IReload
{
if (url == null || url.isEmpty())
{
- LOGGER.log(Level.SEVERE, _("GeoIP download url is empty."));
+ ess.getLogger().log(Level.SEVERE, _("GeoIP download url is empty."));
return;
}
if (!databaseFile.getAbsoluteFile().getParentFile().exists())
@@ -156,7 +155,7 @@ public class EssentialsGeoIPPlayerListener implements Listener, IReload
OutputStream output = null;
try
{
- LOGGER.log(Level.INFO, _("Downloading GeoIP database... this might take a while (country: 0.6 MB, city: 20MB)"));
+ ess.getLogger().log(Level.INFO, _("Downloading GeoIP database... this might take a while (country: 0.6 MB, city: 20MB)"));
final URL downloadUrl = new URL(url);
final URLConnection conn = downloadUrl.openConnection();
conn.setConnectTimeout(10000);
@@ -179,11 +178,11 @@ public class EssentialsGeoIPPlayerListener implements Listener, IReload
}
catch (MalformedURLException ex)
{
- LOGGER.log(Level.SEVERE, _("GeoIP download url is invalid."), ex);
+ ess.getLogger().log(Level.SEVERE, _("GeoIP download url is invalid."), ex);
}
catch (IOException ex)
{
- LOGGER.log(Level.SEVERE, _("Failed to open connection."), ex);
+ ess.getLogger().log(Level.SEVERE, _("Failed to open connection."), ex);
}
finally
{
@@ -195,7 +194,7 @@ public class EssentialsGeoIPPlayerListener implements Listener, IReload
}
catch (IOException ex)
{
- LOGGER.log(Level.SEVERE, _("Failed to open connection."), ex);
+ ess.getLogger().log(Level.SEVERE, _("Failed to open connection."), ex);
}
}
if (input != null)
@@ -206,7 +205,7 @@ public class EssentialsGeoIPPlayerListener implements Listener, IReload
}
catch (IOException ex)
{
- LOGGER.log(Level.SEVERE, _("Failed to open connection."), ex);
+ ess.getLogger().log(Level.SEVERE, _("Failed to open connection."), ex);
}
}
}