From 2829e298d529d38ad23c9bd36043976f4527c5e2 Mon Sep 17 00:00:00 2001 From: 502647092 Date: Sun, 30 Jul 2017 14:39:58 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E8=B0=83=E6=95=B4=E8=B0=83?= =?UTF-8?q?=E8=AF=95=E6=97=A5=E5=BF=97=E8=BE=93=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 502647092 --- pom.xml | 2 +- src/main/java/pw/yumc/YumCore/bukkit/Log.java | 13 +++++++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/pom.xml b/pom.xml index 13e9063..149b544 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 pw.yumc YumCore - 1.8.2 + 1.8.3 ${project.artifactId} diff --git a/src/main/java/pw/yumc/YumCore/bukkit/Log.java b/src/main/java/pw/yumc/YumCore/bukkit/Log.java index afe850a..705a883 100644 --- a/src/main/java/pw/yumc/YumCore/bukkit/Log.java +++ b/src/main/java/pw/yumc/YumCore/bukkit/Log.java @@ -115,7 +115,9 @@ public class Log { * 参数 */ public static void d(String msg, Object... object) { - d(String.format(msg, object)); + if (debug) { + logger.info(String.format(msg, object)); + } } /** @@ -166,7 +168,9 @@ public class Log { * 参数 */ public static void fd(String msg, Object... object) { - fd(String.format(msg, object)); + if (fullDebug) { + logger.info("[DEBUG] " + String.format(msg, object)); + } } /** @@ -301,7 +305,8 @@ public class Log { /** * Log a SEVERE message. *

- * If the logger is currently enabled for the SEVERE message level then the given message is forwarded to all the registered output Handler objects. + * If the logger is currently enabled for the SEVERE message level then the + * given message is forwarded to all the registered output Handler objects. * * @param msg * The string message (or a key in the message catalog) @@ -367,7 +372,7 @@ public class Log { * 参数 */ public static void w(String string, Object... objects) { - logger.warning(String.format(string, objects)); + w(String.format(string, objects)); } /**