1
0
mirror of https://github.com/essentials/Essentials.git synced 2025-08-11 09:05:01 +02:00

More logging!

This commit is contained in:
drtshock
2013-05-02 22:19:28 -05:00
parent f326d0ad0c
commit 3ff12f6bf5
17 changed files with 48 additions and 60 deletions

View File

@@ -17,7 +17,7 @@ public class EssentialsUpdate extends JavaPlugin
{
if (!getDataFolder().exists() && !getDataFolder().mkdirs())
{
Bukkit.getLogger().log(Level.SEVERE, "Could not create data folder: {0}", getDataFolder().getPath());
getLogger().log(Level.SEVERE, "Could not create data folder: {0}", getDataFolder().getPath());
}
essentialsHelp = new EssentialsHelp(this);
essentialsHelp.registerEvents();
@@ -33,7 +33,7 @@ public class EssentialsUpdate extends JavaPlugin
}
else
{
Bukkit.getLogger().info("Essentials is ready for installation. Join the game and follow the instructions.");
getLogger().info("Essentials is ready for installation. Join the game and follow the instructions.");
}
}

View File

@@ -42,7 +42,7 @@ public class UpdateCheck
{
if (new File(plugin.getDataFolder().getParentFile(), "Essentials.jar").exists())
{
Bukkit.getLogger().severe("Essentials.jar found, but not recognized by Bukkit. Broken download?");
plugin.getLogger().severe("Essentials.jar found, but not recognized by Bukkit. Broken download?");
}
}
}

View File

@@ -19,7 +19,6 @@ import org.bukkit.plugin.Plugin;
public class UpdateFile
{
private final static Logger LOGGER = Bukkit.getLogger();
private final static String UPDATE_URL = "http://goo.gl/67jev";
private final static BigInteger PUBLIC_KEY = new BigInteger(
"5ha6a2d4qdy17ttkg8evh74sl5a87djojwenu12k1lvy8ui6003e6l06rntczpoh99mhc3txj8mqlxw111oyy9yl7s7qpyluyzix3j1odxrxx4u52gxvyu6qiteapczkzvi7rxgeqsozz7b19rdx73a7quo9ybwpz1cr82r7x5k0pg2a73pjjsv2j1awr13azo7klrcxp9y5xxwf5qv1s3tw4zqftli18u0ek5qkbzfbgk1v5n2f11pkwwk6p0mibrn26wnjbv11vyiqgu95o7busmt6vf5q7grpcenl637w83mbin56s3asj1131b2mscj9xep3cbj7la9tgsxl5bj87vzy8sk2d34kzwqdqgh9nry43nqqus12l1stmiv184r8r3jcy8w43e8h1u1mzklldb5eytkuhayqik8l3ns04hwt8sgacvw534be8sx26qrn5s1",
@@ -37,12 +36,12 @@ public class UpdateFile
{
if (file.exists() && !file.delete())
{
LOGGER.log(Level.SEVERE, "Could not delete file update.yml!");
plugin.getLogger().log(Level.SEVERE, "Could not delete file update.yml!");
return;
}
if (!downloadFile() || !checkFile())
{
LOGGER.log(Level.SEVERE, "Could not download and verify file update.yml!");
plugin.getLogger().log(Level.SEVERE, "Could not download and verify file update.yml!");
return;
}
}
@@ -52,7 +51,7 @@ public class UpdateFile
}
catch (Exception ex)
{
LOGGER.log(Level.SEVERE, "Could not load update.yml!");
plugin.getLogger().log(Level.SEVERE, "Could not load update.yml!");
}
}
@@ -69,7 +68,7 @@ public class UpdateFile
}
catch (IOException ex)
{
LOGGER.log(Level.SEVERE, "Error while downloading update.yml", ex);
plugin.getLogger().log(Level.SEVERE, "Error while downloading update.yml", ex);
return false;
}
}
@@ -163,7 +162,7 @@ public class UpdateFile
}
catch (Exception ex)
{
LOGGER.log(Level.SEVERE, ex.getMessage(), ex);
plugin.getLogger().log(Level.SEVERE, ex.getMessage(), ex);
}
finally
{
@@ -176,7 +175,7 @@ public class UpdateFile
}
catch (IOException ex)
{
LOGGER.log(Level.SEVERE, ex.getMessage(), ex);
plugin.getLogger().log(Level.SEVERE, ex.getMessage(), ex);
}
}
return false;

View File

@@ -43,7 +43,7 @@ public class UpdateProcess implements Listener
{
currentPlayer.sendMessage("A newer version of EssentialsUpdate is found. Downloading new file and reloading server.");
}
Bukkit.getLogger().log(Level.INFO, "A newer version of EssentialsUpdate is found. Downloading new file and reloading server.");
plugin.getLogger().log(Level.INFO, "A newer version of EssentialsUpdate is found. Downloading new file and reloading server.");
new SelfUpdate(
new AbstractWorkListener(plugin, updateCheck.getNewVersionInfo())
{
@@ -70,7 +70,7 @@ public class UpdateProcess implements Listener
}
if (message != null && !message.isEmpty())
{
Bukkit.getLogger().log(Level.INFO, message);
plugin.getLogger().log(Level.INFO, message);
}
UpdateProcess.this.currentPlayer = null;
}