reduce log verbosity.

This commit is contained in:
Nick Minkler 2014-01-28 12:06:24 -08:00
parent 5b6ce6ce6a
commit 762489b779

View File

@ -112,7 +112,7 @@ import net.milkbowl.vault.economy.plugins.Economy_MiConomy;
public class Vault extends JavaPlugin { public class Vault extends JavaPlugin {
private static final Logger log = Logger.getLogger("Minecraft"); private static Logger log;
private Permission perms; private Permission perms;
private String newVersionTitle = ""; private String newVersionTitle = "";
private double newVersion = 0; private double newVersion = 0;
@ -132,6 +132,7 @@ public class Vault extends JavaPlugin {
@Override @Override
public void onEnable() { public void onEnable() {
plugin = this; plugin = this;
log = this.getLogger();
currentVersionTitle = getDescription().getVersion().split("-")[0]; currentVersionTitle = getDescription().getVersion().split("-")[0];
currentVersion = Double.valueOf(currentVersionTitle.replaceFirst("\\.", "")); currentVersion = Double.valueOf(currentVersionTitle.replaceFirst("\\.", ""));
sm = getServer().getServicesManager(); sm = getServer().getServicesManager();
@ -166,21 +167,16 @@ public class Vault extends JavaPlugin {
if (getServer().getConsoleSender().hasPermission("vault.update")) { if (getServer().getConsoleSender().hasPermission("vault.update")) {
try { try {
newVersion = updateCheck(currentVersion); newVersion = updateCheck(currentVersion);
log.info("***** Vault Version Checker ***** "); log.info("Checking for Updates:");
if (newVersion > currentVersion) { if (newVersion > currentVersion) {
log.warning("Stable Version: " + newVersionTitle + " is out!"); log.warning("Stable Version: " + newVersionTitle + " is out!" + " You are still running version: " + currentVersionTitle);
log.warning("Current Version: " + currentVersionTitle); log.warning("Update at: http://dev.bukkit.org/server-mods/vault");
log.warning("Update Vault at: http://dev.bukkit.org/server-mods/vault");
} else if (currentVersion > newVersion) { } else if (currentVersion > newVersion) {
log.info("Stable Version: " + newVersionTitle); log.info("Stable Version: " + newVersionTitle + " Current Version: " + currentVersionTitle);
log.info("Current Version: " + currentVersionTitle);
log.info("You are on a development or experimental build, Happy testing!"); log.info("You are on a development or experimental build, Happy testing!");
} else { } else {
log.info("Stable Version: " + newVersionTitle);
log.info("Current Version: " + currentVersionTitle);
log.info("No new version available"); log.info("No new version available");
} }
log.info("*********************************");
} catch (Exception e) { } catch (Exception e) {
// ignore exceptions // ignore exceptions
} }