summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsnowleo <schneeleo@gmail.com>2011-07-19 12:04:06 +0200
committersnowleo <schneeleo@gmail.com>2011-07-19 12:04:06 +0200
commit3b59dd0b02f4fa8fa1ab4f8d9f96147592fbbd24 (patch)
tree893b43fb1c88ff8ecd8d688a5121d5cac72c85a7
parente805d1047f1c1a694b9a095a8a2d2b23e7caa2f0 (diff)
downloadEssentials-3b59dd0b02f4fa8fa1ab4f8d9f96147592fbbd24.tar
Essentials-3b59dd0b02f4fa8fa1ab4f8d9f96147592fbbd24.tar.gz
Essentials-3b59dd0b02f4fa8fa1ab4f8d9f96147592fbbd24.tar.lz
Essentials-3b59dd0b02f4fa8fa1ab4f8d9f96147592fbbd24.tar.xz
Essentials-3b59dd0b02f4fa8fa1ab4f8d9f96147592fbbd24.zip
Fix duplicated logger messages in GM after reload
-rw-r--r--EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java b/EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java
index 1594755de..890af718b 100644
--- a/EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java
+++ b/EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java
@@ -48,6 +48,7 @@ public class GroupManager extends JavaPlugin {
private boolean validateOnlinePlayer = true;
private boolean isReady = false;
private GMConfiguration config;
+ private GMLoggerHandler ch;
public static final Logger logger = Logger.getLogger(GroupManager.class.getName());
@Override
@@ -59,12 +60,13 @@ public class GroupManager extends JavaPlugin {
// EXAMPLE: Custom code, here we just output some info so we can check all is well
PluginDescriptionFile pdfFile = this.getDescription();
System.out.println(pdfFile.getName() + " version " + pdfFile.getVersion() + " is disabled!");
+ GroupManager.logger.removeHandler(ch);
}
@Override
public void onEnable() {
GroupManager.logger.setUseParentHandlers(false);
- GMLoggerHandler ch = new GMLoggerHandler();
+ ch = new GMLoggerHandler();
GroupManager.logger.addHandler(ch);
logger.setLevel(Level.ALL);
if (worldsHolder == null) {