diff --git a/android/runtime/v8/src/native/modules/APIModule.cpp b/android/runtime/v8/src/native/modules/APIModule.cpp index a2628327880..c460ac87dc2 100644 --- a/android/runtime/v8/src/native/modules/APIModule.cpp +++ b/android/runtime/v8/src/native/modules/APIModule.cpp @@ -115,7 +115,13 @@ void APIModule::logInfo(const FunctionCallbackInfo& args) Isolate* isolate = args.GetIsolate(); HandleScope scope(isolate); v8::String::Utf8Value message(isolate, APIModule::combineLogMessages(args)); - APIModule::logInternal(LOG_LEVEL_INFO, LCAT, *message); + + std::string cppStr(*message); + + int maxChunk = 4050; + for (size_t i = 0, len = cppStr.length(); i < len; i+=maxChunk) { + APIModule::logInternal(LOG_LEVEL_INFO, LCAT, cppStr.substr(i , maxChunk).c_str()); + } } void APIModule::logWarn(const FunctionCallbackInfo& args)