From f5c2d72429e5001c48a2eb3142b68c23f130c393 Mon Sep 17 00:00:00 2001 From: topjohnwu Date: Sat, 16 Jan 2021 16:10:47 -0800 Subject: [PATCH] Also log pid and tid --- gradle.properties | 2 +- native/jni/core/daemon.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gradle.properties b/gradle.properties index e5cff39f2..e52011f9b 100644 --- a/gradle.properties +++ b/gradle.properties @@ -27,6 +27,6 @@ android.injected.testOnly=false kapt.incremental.apt=true # Magisk -magisk.versionCode=21202 +magisk.versionCode=21301 magisk.ndkVersion=21d magisk.fullNdkVersion=21.3.6528147 diff --git a/native/jni/core/daemon.cpp b/native/jni/core/daemon.cpp index ef777eb41..fc3842cba 100644 --- a/native/jni/core/daemon.cpp +++ b/native/jni/core/daemon.cpp @@ -207,7 +207,7 @@ static int magisk_log(int prio, const char *fmt, va_list ap) { localtime_r(&tv.tv_sec, &tm); size_t len = strftime(buf, sizeof(buf), "%m-%d %T", &tm); int ms = tv.tv_usec / 1000; - len += sprintf(buf + len, ".%03d %c : ", ms, type); + len += sprintf(buf + len, ".%03d %*d %*d %c : ", ms, 5, getpid(), 5, gettid(), type); strcpy(buf + len, fmt); return vfprintf(local_log_file.get(), buf, args); }