limit number of lines to fetch from logcat

for performance and to avoid crashes with potential +250MB in logs
when there are unexpected errors resulting in the same lines logging
over and over several times per second
This commit is contained in:
adbenitez
2024-08-19 15:37:13 +02:00
parent 7dbc472d01
commit 537056bfa1
@@ -129,7 +129,7 @@ public class LogViewFragment extends Fragment {
private static String grabLogcat(LogViewFragment fragment) {
try {
final Process process = Runtime.getRuntime().exec("logcat -v threadtime -d");
final Process process = Runtime.getRuntime().exec("logcat -v threadtime -d -t 10000");
final BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(process.getInputStream()));
final StringBuilder log = new StringBuilder();
final String separator = System.getProperty("line.separator");