summaryrefslogtreecommitdiff
path: root/ravenwood/runtime-helper-src
diff options
context:
space:
mode:
author Makoto Onuki <omakoto@google.com> 2024-11-06 16:42:42 -0800
committer Makoto Onuki <omakoto@google.com> 2024-11-06 16:42:42 -0800
commit5f4124c6e6163f607b9a873f53e95a5dd002e38b (patch)
treee637821dbfddabc972d58f1870ea5bd1e397921a /ravenwood/runtime-helper-src
parent591470a118da74c17e8aa83c3ece812c45cd4d60 (diff)
Disable verbose / debug log by default
To enable them, set RAVENWOOD_VERBOSE to "1". Flag: EXEMPT host test change only Bug: 292141694 Test: $ANDROID_BUILD_TOP/frameworks/base/ravenwood/scripts/run-ravenwood-tests.sh Change-Id: Ie6f6f910065ae22e80753d8f6c2406dd4c0c0c40
Diffstat (limited to 'ravenwood/runtime-helper-src')
-rw-r--r--ravenwood/runtime-helper-src/framework/android/util/Log_host.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/ravenwood/runtime-helper-src/framework/android/util/Log_host.java b/ravenwood/runtime-helper-src/framework/android/util/Log_host.java
index d232ef2076be..c85bd23db893 100644
--- a/ravenwood/runtime-helper-src/framework/android/util/Log_host.java
+++ b/ravenwood/runtime-helper-src/framework/android/util/Log_host.java
@@ -18,6 +18,7 @@ package android.util;
import android.util.Log.Level;
import com.android.internal.os.RuntimeInit;
+import com.android.ravenwood.common.RavenwoodCommonUtils;
import java.io.PrintStream;
@@ -35,6 +36,9 @@ public class Log_host {
}
public static int println_native(int bufID, int priority, String tag, String msg) {
+ if (priority < Log.INFO && !RavenwoodCommonUtils.RAVENWOOD_VERBOSE_LOGGING) {
+ return msg.length(); // No verbose logging.
+ }
final String buffer;
switch (bufID) {
case Log.LOG_ID_MAIN: buffer = "main"; break;