From 322b09bc09153c3e5adcd6570199b4d82c41f994 Mon Sep 17 00:00:00 2001 From: Michael Gangolf Date: Mon, 16 Sep 2024 11:02:50 +0200 Subject: [PATCH] feat(android): more log output (#13999) * feat(android): more log output * remove if * change for loop * Update android/runtime/v8/src/native/modules/APIModule.cpp Co-authored-by: Chris Barber --------- Co-authored-by: Chris Barber --- android/runtime/v8/src/native/modules/APIModule.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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)