Skip to content

Commit

Permalink
feat(android): more log output (#13999)
Browse files Browse the repository at this point in the history
* feat(android): more log output

* remove if

* change for loop

* Update android/runtime/v8/src/native/modules/APIModule.cpp

Co-authored-by: Chris Barber <[email protected]>

---------

Co-authored-by: Chris Barber <[email protected]>
  • Loading branch information
m1ga and cb1kenobi authored Sep 16, 2024
1 parent 5baf6a1 commit 322b09b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion android/runtime/v8/src/native/modules/APIModule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,13 @@ void APIModule::logInfo(const FunctionCallbackInfo<Value>& 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<Value>& args)
Expand Down

0 comments on commit 322b09b

Please sign in to comment.