feat: 添加格式化调试和异常调试

Signed-off-by: 502647092 <admin@yumc.pw>
This commit is contained in:
502647092 2016-09-12 18:32:05 +08:00
parent a27a8dc79e
commit b699068d6b
1 changed files with 24 additions and 0 deletions

View File

@ -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 获得插件前缀 * @return 获得插件前缀
*/ */