mirror of
https://github.com/ArcaneChat/android.git
synced 2026-07-03 14:05:24 +02:00
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:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user