From 665dccbcc5f8847f1a785b60f0c1c705942e7f3c Mon Sep 17 00:00:00 2001 From: Eric Stokes Date: Sun, 19 Jun 2011 09:55:21 -0600 Subject: [PATCH] Additional comments to logger --- .../onarandombox/MultiverseCore/MultiverseCore.java | 2 +- src/com/onarandombox/utils/DebugLog.java | 12 ++++++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/com/onarandombox/MultiverseCore/MultiverseCore.java b/src/com/onarandombox/MultiverseCore/MultiverseCore.java index 98310ca6..b71e5cdf 100644 --- a/src/com/onarandombox/MultiverseCore/MultiverseCore.java +++ b/src/com/onarandombox/MultiverseCore/MultiverseCore.java @@ -120,7 +120,7 @@ public class MultiverseCore extends JavaPlugin { // Create our DataFolder getDataFolder().mkdirs(); // Setup our Debug Log - debugLog = new DebugLog("Multiverse", getDataFolder() + File.separator + "debug.log"); + debugLog = new DebugLog("Multiverse-Core", getDataFolder() + File.separator + "debug.log"); // Setup & Load our Configuration files. loadConfigs(); diff --git a/src/com/onarandombox/utils/DebugLog.java b/src/com/onarandombox/utils/DebugLog.java index 82cca6a3..dfa6bc02 100644 --- a/src/com/onarandombox/utils/DebugLog.java +++ b/src/com/onarandombox/utils/DebugLog.java @@ -15,7 +15,11 @@ public class DebugLog { private FileHandler fh; private Logger log; - + /** + * Creates a new debug logger. + * @param logger The name of the logger. + * @param file The file to log to. + */ public DebugLog(String logger, String file) { log = Logger.getLogger(logger); @@ -34,7 +38,11 @@ public class DebugLog { e.printStackTrace(); } } - + /** + * Log a message at a certain level + * @param level + * @param msg + */ public void log(Level level, String msg) { log.log(level, msg); }