Skip to content

Commit

Permalink
7.0.4
Browse files Browse the repository at this point in the history
- 修正关于 exitAnim 动画的参数顺序颠倒问题;
- log 和 errorLog 现在支持了新写法:`log(obj1, obj2, obj3...)` 会按顺序打印;
  • Loading branch information
kongzue committed Nov 26, 2024
1 parent ede9f00 commit e12614f
Showing 1 changed file with 5 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ public static void LogI(Object... obj) {
public static void LogI(Object obj, boolean showStack) {
try {
if (DEBUGMODE) {
if (obj instanceof Object[]) {
if (obj instanceof Object[] && ((Object[]) obj).length > 1) {
for (Object o : (Object[]) obj) {
LogI(o);
LogI(o, showStack);
}
return;
}
Expand Down Expand Up @@ -131,17 +131,15 @@ public static String getCodeLineStr(boolean showStack) {
stackStr = stackStr + "[" + stackTraceElements[i].getMethodName() + "](" + stackTraceElements[i].getFileName() + ":" + stackTraceElements[i].getLineNumber() + ")\n";
}
}
result = "Log." +
stackStr +
"[" + stackTraceElements[line].getMethodName() + "](" + stackTraceElements[line].getFileName() + ":" + stackTraceElements[line].getLineNumber() + ")\n";
result = "Log." + stackStr + "[" + stackTraceElements[line].getMethodName() + "](" + stackTraceElements[line].getFileName() + ":" + stackTraceElements[line].getLineNumber() + ")\n";
if (line == -1) return "";
return result;
}

public static void LogE(Object obj) {
try {
if (DEBUGMODE) {
if (obj instanceof Object[]) {
if (obj instanceof Object[] && ((Object[]) obj).length > 1) {
for (Object o : (Object[]) obj) {
LogE(o);
}
Expand Down Expand Up @@ -263,15 +261,7 @@ public static void createWriter() {
logFile = new File(BaseApp.getPrivateInstance().getCacheDir(), System.currentTimeMillis() + ".bfl");
logWriter = new FileWriter(logFile, true);

logWriter.write("BaseApp.Start===============" +
"\npackageName>>>" + BaseApp.getPrivateInstance().getPackageName() +
"\nappVer>>>" + BaseApp.getPrivateInstance().getPackageManager().getPackageInfo(BaseApp.getPrivateInstance().getPackageName(), 0).versionName + "(" + BaseApp.getPrivateInstance().getPackageManager().getPackageInfo(BaseApp.getPrivateInstance().getPackageName(), 0).versionCode + ")" +
"\nmanufacturer>>>" + android.os.Build.BRAND.toLowerCase() +
"\nmodel>>>" + android.os.Build.MODEL.toLowerCase() +
"\nos-ver>>>" + android.os.Build.VERSION.RELEASE.toLowerCase() +
"\nandroidId>>>" + android.provider.Settings.System.getString(BaseApp.getPrivateInstance().getContentResolver(), android.provider.Settings.System.ANDROID_ID) +
"\n\nLog.Start===============\n"
);
logWriter.write("BaseApp.Start===============" + "\npackageName>>>" + BaseApp.getPrivateInstance().getPackageName() + "\nappVer>>>" + BaseApp.getPrivateInstance().getPackageManager().getPackageInfo(BaseApp.getPrivateInstance().getPackageName(), 0).versionName + "(" + BaseApp.getPrivateInstance().getPackageManager().getPackageInfo(BaseApp.getPrivateInstance().getPackageName(), 0).versionCode + ")" + "\nmanufacturer>>>" + android.os.Build.BRAND.toLowerCase() + "\nmodel>>>" + android.os.Build.MODEL.toLowerCase() + "\nos-ver>>>" + android.os.Build.VERSION.RELEASE.toLowerCase() + "\nandroidId>>>" + android.provider.Settings.System.getString(BaseApp.getPrivateInstance().getContentResolver(), android.provider.Settings.System.ANDROID_ID) + "\n\nLog.Start===============\n");
logWriter.close();
} catch (Exception e) {

Expand Down

0 comments on commit e12614f

Please sign in to comment.