How to increase the size of the LogCat buffer in Android Studio?

Bug it or not. But the bottom line is that if I make a request to the server and get an answer. I display the data in LogCat. But the data appears truncated if the text is too long. I bring them to log.e

Is it possible to somehow increase the size of the LogCat buffer so that the text is fully displayed?

Or is this not a buffer?

  • Logcata has a limit on the amount of stored data, above which the buffer is cleared. You can increase the amount of data on the device / emulator in the settings, in the tab "For developers" - AseN
  • @ 0xFFh, I don’t have to increase the size of the buffer. Is it possible to find out how to find this point on gynemotion? - Andro
  • in the settings -> for developers -> log buffer size PS Although I can not vouch for the fact that this option will be called the same way in some Chinese firmware - AseN

1 answer 1

According to en-SO, the length of a string in logCat has some limitation. So you need to cut your long line into parts and display them in parts. Like so

int maxLogSize = 1000; for(int i = 0; i <= veryLongString.length() / maxLogSize; i++) { int start = i * maxLogSize; int end = (i+1) * maxLogSize; end = end > veryLongString.length() ? veryLongString.length() : end; Log.v(TAG, veryLongString.substring(start, end)); } 

Or, in the studio settings, set a larger limit before cutting the line like this:

  • I tried and changed the file manually and changed it in the settings. Still cut down - Andro
  • Splitting a line doesn't help? Cut into 50 characters, so it should work out - YurySPb
  • No, I tried only in the settings. The code that you sent did not. I just wanted to get an answer how to increase the size of the display in the console. My variable contains 50,000 bytes. And only 3000 is displayed in the console - Andro