From d08f326990d421fd70024145a7899819cf46db28 Mon Sep 17 00:00:00 2001 From: topjohnwu Date: Wed, 18 Jul 2018 03:25:36 +0800 Subject: [PATCH] Log fatal errors in debug mode only --- native/jni/core/log_daemon.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/native/jni/core/log_daemon.c b/native/jni/core/log_daemon.c index 3b0c10d2a..4f06eaede 100644 --- a/native/jni/core/log_daemon.c +++ b/native/jni/core/log_daemon.c @@ -137,7 +137,10 @@ void log_daemon() { } chmod("/dev/null", 0666); vec_dup(&log_cmd, &clear_cmd); - vec_push_back_all(&log_cmd, "-v", "threadtime", "-s", "am_proc_start", "Magisk", "*:F", NULL); + vec_push_back_all(&log_cmd, "-v", "threadtime", "-s", "am_proc_start", "Magisk", NULL); +#ifdef MAGISK_DEBUG + vec_push_back(&log_cmd, "*:F"); +#endif vec_push_back(&log_cmd, NULL); vec_push_back(&clear_cmd, "-c"); vec_push_back(&clear_cmd, NULL);