Skip to content

Commit 0132a95

Browse files
author
Dave Burke
committed
Increase max size of log size by 50% on userdebug builds.
Useful especially for last kmsg (e.g. IMG/DSS logs truncate and loose useful info). Since this is a max, won't affect files that are already shorter than 64kb. Change-Id: Ia5bb178678067e69384285e8c338dc8cb6ad071b
1 parent 35ae6e2 commit 0132a95

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

services/java/com/android/server/BootReceiver.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,10 @@
3939
public class BootReceiver extends BroadcastReceiver {
4040
private static final String TAG = "BootReceiver";
4141

42-
// Maximum size of a logged event (files get truncated if they're longer)
43-
private static final int LOG_SIZE = 65536;
42+
// Maximum size of a logged event (files get truncated if they're longer).
43+
// Give userdebug builds a larger max to capture extra debug, esp. for last_kmsg.
44+
private static final int LOG_SIZE =
45+
SystemProperties.getInt("ro.debuggable", 0) == 1 ? 98304 : 65536;
4446

4547
private static final File TOMBSTONE_DIR = new File("/data/tombstones");
4648

0 commit comments

Comments
 (0)