Commit 891bd37b authored by swift_gan's avatar swift_gan

tweak log

parent dd6c7099
package com.swift.sandhook;
import android.util.Log;
public class HookLog {
public static final String TAG = "SandHook";
public static boolean DEBUG = SandHookConfig.DEBUG;
public static int v(String s) {
return Log.v(TAG, s);
}
public static int i(String s) {
return Log.i(TAG, s);
}
public static int d(String s) {
return Log.d(TAG, s);
}
public static int w(String s) {
return Log.w(TAG, s);
}
public static int e(String s) {
return Log.e(TAG, s);
}
public static int e(String s, Throwable t) {
return Log.e(TAG, s, t);
}
}
...@@ -131,7 +131,7 @@ public class SandHook { ...@@ -131,7 +131,7 @@ public class SandHook {
globalBackupMap.put(entity.backup, entity); globalBackupMap.put(entity.backup, entity);
} }
Log.d("SandHook", "method <" + entity.target.toString() + "> hook <" + (res == HookMode.INLINE ? "inline" : "replacement") + "> success!"); HookLog.d("method <" + entity.target.toString() + "> hook <" + (res == HookMode.INLINE ? "inline" : "replacement") + "> success!");
} }
public static Object callOriginMethod(Member originMethod, Object thiz, Object... args) throws Throwable { public static Object callOriginMethod(Member originMethod, Object thiz, Object... args) throws Throwable {
......
...@@ -2,14 +2,16 @@ package com.swift.sandhook.xposedcompat.utils; ...@@ -2,14 +2,16 @@ package com.swift.sandhook.xposedcompat.utils;
import android.util.Log; import android.util.Log;
import com.swift.sandhook.SandHookConfig;
import java.lang.reflect.Member; import java.lang.reflect.Member;
public class DexLog { public class DexLog {
public static final String TAG = "SandXposed-dexmaker"; public static final String TAG = "SandXposed";
public static boolean DEBUG = true; public static boolean DEBUG = SandHookConfig.DEBUG;
public static int v(String s) { public static int v(String s) {
return Log.v(TAG, s); return Log.v(TAG, s);
...@@ -25,13 +27,13 @@ public class DexLog { ...@@ -25,13 +27,13 @@ public class DexLog {
public static void printMethodHookIn(Member member) { public static void printMethodHookIn(Member member) {
if (DEBUG && member != null) { if (DEBUG && member != null) {
Log.d("SandHook-Xposed", "method <" + member.toString() + "> hook in"); Log.d(TAG, "method <" + member.toString() + "> hook in");
} }
} }
public static void printCallOriginError(Member member) { public static void printCallOriginError(Member member) {
if (member != null) { if (member != null) {
Log.e("SandHook-Xposed", "method <" + member.toString() + "> call origin error!"); Log.e(TAG, "method <" + member.toString() + "> call origin error!");
} }
} }
......
...@@ -41,7 +41,7 @@ public final class XposedBridge { ...@@ -41,7 +41,7 @@ public final class XposedBridge {
public static final ClassLoader BOOTCLASSLOADER = XposedBridge.class.getClassLoader(); public static final ClassLoader BOOTCLASSLOADER = XposedBridge.class.getClassLoader();
/** @hide */ /** @hide */
public static final String TAG = "SandXposed-Bridge"; public static final String TAG = "SandXposed";
/** @deprecated Use {@link #getXposedVersion()} instead. */ /** @deprecated Use {@link #getXposedVersion()} instead. */
@Deprecated @Deprecated
......
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 to comment