Commit 331d1adc by pye52

现在日志可以输出异常堆栈信息了

parent 18a50767
......@@ -256,8 +256,7 @@ public class MainWebSocket extends WebSocketClient {
@Override
public void onError(Exception ex) {
LogUtil.i(TAG, "onError");
ex.printStackTrace();
LogUtil.i(TAG, "onError", ex);
}
public static class Request {
......
......@@ -12,21 +12,41 @@ public class LogUtil {
sEnable = enable;
}
public static void i(String tag, String log, Exception e) {
if (!sEnable) return;
Log.i(tag, log, e);
}
public static void i(String tag, String log) {
if (!sEnable) return;
Log.i(tag, log);
}
public static void d(String tag, String log, Exception e) {
if (!sEnable) return;
Log.d(tag, log, e);
}
public static void d(String tag, String log) {
if (!sEnable) return;
Log.d(tag, log);
}
public static void w(String tag, String log, Exception e) {
if (!sEnable) return;
Log.w(tag, log, e);
}
public static void w(String tag, String log) {
if (!sEnable) return;
Log.w(tag, log);
}
public static void e(String tag, String log, Exception e) {
if (!sEnable) return;
Log.e(tag, log, e);
}
public static void e(String tag, String log) {
if (!sEnable) return;
Log.e(tag, log);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment