From b699068d6bd1905c0434b36055d5c7b4a8ff70ed Mon Sep 17 00:00:00 2001 From: 502647092 Date: Mon, 12 Sep 2016 18:32:05 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E6=A0=BC=E5=BC=8F?= =?UTF-8?q?=E5=8C=96=E8=B0=83=E8=AF=95=E5=92=8C=E5=BC=82=E5=B8=B8=E8=B0=83?= =?UTF-8?q?=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 502647092 --- src/main/java/pw/yumc/YumCore/bukkit/Log.java | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/src/main/java/pw/yumc/YumCore/bukkit/Log.java b/src/main/java/pw/yumc/YumCore/bukkit/Log.java index 27bfea9..c59d560 100644 --- a/src/main/java/pw/yumc/YumCore/bukkit/Log.java +++ b/src/main/java/pw/yumc/YumCore/bukkit/Log.java @@ -49,6 +49,18 @@ public class Log { } } + /** + * 调试消息 + * + * @param msg + * 消息 + * @param object + * 参数 + */ + public static void d(final String msg, final Object... object) { + debug(String.format(msg, object)); + } + /** * 调试消息 * @@ -88,6 +100,18 @@ public class Log { } } + /** + * 调试消息 + * + * @param e + * 异常 + */ + public static void debug(final Throwable e) { + if (debug) { + e.printStackTrace(); + } + } + /** * @return 获得插件前缀 */