diff --git a/modules/juce_core/native/juce_android_Misc.cpp b/modules/juce_core/native/juce_android_Misc.cpp index 8ad39bed56..4bc0d7a5bb 100644 --- a/modules/juce_core/native/juce_android_Misc.cpp +++ b/modules/juce_core/native/juce_android_Misc.cpp @@ -25,7 +25,20 @@ namespace juce void Logger::outputDebugString (const String& text) { - __android_log_print (ANDROID_LOG_INFO, "JUCE", "%s", text.toUTF8().getAddress()); + char* data = text.toUTF8().getAddress(); + const size_t length = CharPointer_UTF8::getBytesRequiredFor (text.getCharPointer()); + const size_t chunkSize = 1023; + + size_t position = 0; + size_t numToRead = jmin (chunkSize, length); + + while (numToRead > 0) + { + __android_log_print (ANDROID_LOG_INFO, "JUCE", "%s", data + position); + + position += numToRead; + numToRead = jmin (chunkSize, length - position); + } } } // namespace juce