Adb logcat: increase the maximum message length

logcat seems to truncate very long log messages, is there a way to prevent this?

$ adb logcat -g ring buffer is 64Kb (63Kb consumed), max entry is 20480b, max payload is 20460b 

I think I need to increase the maximum recording and / or payload size !?

Regards Alex

+4
source share
2 answers

Max. input and maximum payload are encoded as shown below. Therefore, I do not think you can change them.

'# define LOGGER_ENTRY_MAX_LEN (4 * 1024)
'#define LOGGER_ENTRY_MAX_PAYLOAD \ (LOGGER_ENTRY_MAX_LEN - sizeof (struct logger_entry))

+3
source

Perhaps you can create your own class that will send you your messages, which then divide them into several messages. as:

 MyLogger.d("LOG_TAG",veryLongMessage); 

This class then simply could check the size of the message and split it if necessary, and then pass them to Log.d ().

0
source

Source: https://habr.com/ru/post/1389842/


All Articles